for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Pumpkin\Database;
/**
* Class PathFinder
* Finds file path for table.
*
* @package Pumpkin
* @author Raphaël Lefebvre <[email protected]>
*/
class PathFinder
{
* @var Table
private $table;
* Constructor.
* @param Table $table
public function __construct(Table $table)
$this->setTable($table);
}
* @param string[] $supportedExtensions
* @return string
* @throws \RuntimeException
public function findDataPath(array $supportedExtensions)
$pathFinder = new \Pumpkin\Test\PathFinder($this->getTable()->getTest());
return $pathFinder->findPath($this->getFileSubPath(), $supportedExtensions);
private function getFileSubPath()
return sprintf(
'/fixtures/databases/%s/data/%s',
$this->getTable()->getDataBaseName(),
$this->getTable()->getName()
);
private function setTable(Table $table)
$this->table = $table;
* @return Table
private function getTable()
return $this->table;