for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace SmartWeb\ModuleTesting\Util;
use Mockery;
use Mockery\MockInterface;
/**
* Trait WithMockery
*
* @package SmartWeb\ModuleTesting\Util
*/
trait WithMockery
{
* @param array $args
* @return MockInterface
protected function partialMock(...$args) : MockInterface
return $this->mock(...$args)
->makePartial();
}
* @param array ...$args
protected function mock(...$args) : MockInterface
return Mockery::mock(...$args)
->shouldAllowMockingProtectedMethods();