for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PhpGitHooks\Module\Configuration\Tests\Stub;
use PhpGitHooks\Module\Configuration\Domain\Enabled;
use PhpGitHooks\Module\Configuration\Domain\Messages;
use PhpGitHooks\Module\Configuration\Domain\PrePush;
use PhpGitHooks\Module\Configuration\Domain\Undefined;
use PhpGitHooks\Module\Configuration\Model\ExecuteInterface;
use PhpGitHooks\Module\Tests\Infrastructure\Stub\RandomStubInterface;
class PrePushStub implements RandomStubInterface
{
/**
* @param Undefined $undefined
* @param Enabled $enabled
* @param ExecuteInterface $execute
* @param Messages $messages
*
* @return PrePush
*/
public static function create(Undefined $undefined, Enabled $enabled, ExecuteInterface $execute, Messages $messages)
return new PrePush(
$undefined,
$enabled,
$execute,
$messages
);
}
public static function random()
return self::create(
new Undefined(false),
EnabledStub::random(),
PrePushExecuteStub::create(PhpUnitStub::random()),
MessagesStub::random()
public static function createAllEnabled()
EnabledStub::create(true),
PrePushExecuteStub::createEnabled(),
MessagesStub::create(MessageStub::create('0k'), MessageStub::create('Faltal'))
public static function setUndefined()
new Undefined(true),
EnabledStub::create(false),
PrePushExecuteStub::create(PhpUnitStub::setUndefined()),