public function toArray()
{
$conf = null;
$phpConfFile = $this->getConfFilePath();
require $phpConfFile;
if ($conf === null) {
throw new ConfNotSupportedException($phpConfFile);
}
return $conf;
}
public function testPhpWrongConfFile() { $this->setExpectedException('Fakerino\\Configuration\\Exception\\ConfNotSupportedException'); $fileDir = __DIR__ . '/../../Fixtures/'; $phpFilePath = $fileDir . 'fileWrongConf.php'; $phpFile = new File($phpFilePath); $phpConf = new PhpConfigurationFile($phpFile); $this->assertInternalType('array', $phpConf->toArray()); }