for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Amock\MockMethod;
class SelfReturn extends Handler
{
public function handle(): bool
if (!$this->canHandle()) {
return false;
}
$this->initialStub
->method($this->methodName)
->will($this->testCase->returnSelf());
return true;
private function canHandle(): bool
return is_string($this->methodMockConfig)
&& substr($this->methodMockConfig, 0, 5) === '@self';