2018-12-08 23:26:47 +01:00
|
|
|
<?php
|
|
|
|
namespace Prophecy\Prophecy {
|
|
|
|
/** @template T */
|
|
|
|
class ObjectProphecy implements ProphecyInterface
|
|
|
|
{
|
|
|
|
/** @return T */
|
|
|
|
public function reveal() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
class MethodProphecy
|
|
|
|
{
|
|
|
|
public function willReturn(...$values): self {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Prophecy {
|
|
|
|
use Prophecy\Argument\Token;
|
|
|
|
class Argument
|
|
|
|
{
|
2020-05-24 20:29:41 +02:00
|
|
|
/** @param callable(mixed...):bool $callback */
|
2018-12-08 23:26:47 +01:00
|
|
|
public static function that(callable $callback): Token\CallbackToken {}
|
|
|
|
|
|
|
|
/** @param mixed ...$tokens */
|
|
|
|
public static function allOf(...$tokens): Token\LogicalAndToken {}
|
|
|
|
}
|
|
|
|
}
|
2020-08-24 20:56:33 +02:00
|
|
|
|
|
|
|
namespace Prophecy\PhpUnit {
|
|
|
|
use Prophecy\Prophecy\ObjectProphecy;
|
|
|
|
trait ProphecyTrait
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @template T
|
|
|
|
* @param class-string<T> $classOrInterface
|
|
|
|
* @return ObjectProphecy<T>
|
|
|
|
*/
|
|
|
|
protected function prophesize($classOrInterface): ObjectProphecy {}
|
|
|
|
}
|
|
|
|
}
|