for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Tests\Prophecy\Promise;
/**
* @internal
*/
final class CallbackPromiseTest extends \PHPUnit_Framework_TestCase
{
public function testCallbackPromise()
$fixer = $this->prophesize('Tests\Prophecy\Promise\CallbackPromiseTestDummy');
$fixer->getName()->will(static function (array $arguments) use (&$things) {
$arguments
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return $things
? 'yes'
: 'no'
;
});
$this->assertSame('no', $fixer->reveal()->getName());
}
class CallbackPromiseTestDummy
public function getName() {
return 'dummy';
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.