/** * @param PhpSpec\Locator\PSR0\PSR0Resource $resource * @param PhpSpec\Locator\PSR0\PSR0Resource $resource2 * @param Knp\PhpSpec\WellDone\Util\Filesystem $filesystem **/ function let($resource, $resource2, $filesystem) { $resource->getSpecFilename()->willReturn('spec/The/Path.php'); $resource->getSrcFilename()->willReturn('src/The/Path.php'); $resource->getSrcClassname()->willReturn('The\\Path'); $resource2->getSrcClassname()->willReturn('The\\PathType'); $this->beConstructedWith($filesystem); }
/** * @param PhpSpec\Util\Filesystem $filesystem * @param PhpSpec\Locator\PSR0\PSR0Resource $resource1 * @param PhpSpec\Locator\PSR0\PSR0Resource $resource2 * @param PhpSpec\Locator\PSR0\PSR0Resource $resource3 **/ function let($filesystem, $resource1, $resource2, $resource3) { $this->beConstructedWith($filesystem); $resource1->getSpecFilename()->willReturn('/home/user/php/spec/File1Spec.php'); $resource1->getSrcClassname()->willReturn('Knp\\File1'); $resource2->getSpecFilename()->willReturn('/home/user/php/spec/File2Spec.php'); $resource2->getSrcClassname()->willReturn('Knp\\File2'); $resource3->getSpecFilename()->willReturn('/home/user/php/spec/File3Spec.php'); $resource3->getSrcClassname()->willReturn('Knp\\File3'); $filesystem->pathExists(Argument::any())->willReturn(false); $filesystem->pathExists('/home/user/php/spec/File1Spec.php')->willReturn(true); }