for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Pumpkin\Mock;
use Pumpkin\Test\TestHelper;
use TRex\Parser\ClassName;
/**
* Class PathFinder
* @package Pumpkin\Mock
* @author Raphaël Lefebvre <[email protected]>
*/
class PathFinder extends TestHelper
{
* @return string
public function findMocksPath()
$pathFinder = new \Pumpkin\Test\PathFinder($this->getTest());
return $pathFinder->findPath($this->getFileSubPath(), array('php'));
}
private function getFileSubPath()
$className = new ClassName($this->getTest()->getReflectedTestMethod()->getDeclaringClass()->getName());
return sprintf(
'/fixtures/mocks/%s/%s',
$className->getBaseName(),
$this->getTest()->getReflectedTestMethod()->getName()
);