2012-04-27 09:42:58 +00:00
|
|
|
<?php
|
2013-05-27 08:41:50 +00:00
|
|
|
|
2012-04-27 09:42:58 +00:00
|
|
|
/*
|
|
|
|
* This file is part of Composer.
|
|
|
|
*
|
|
|
|
* (c) Nils Adermann <naderman@naderman.de>
|
|
|
|
* Jordi Boggiano <j.boggiano@seld.be>
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Composer\Test;
|
|
|
|
|
|
|
|
use Composer\Installer;
|
2012-05-27 22:11:18 +00:00
|
|
|
use Composer\Console\Application;
|
2012-05-13 19:40:42 +00:00
|
|
|
use Composer\Json\JsonFile;
|
2012-04-27 09:42:58 +00:00
|
|
|
use Composer\Repository\ArrayRepository;
|
|
|
|
use Composer\Repository\RepositoryManager;
|
2013-04-28 20:32:46 +00:00
|
|
|
use Composer\Repository\InstalledArrayRepository;
|
2012-08-23 13:52:40 +00:00
|
|
|
use Composer\Package\RootPackageInterface;
|
2012-04-27 09:42:58 +00:00
|
|
|
use Composer\Package\Link;
|
2012-05-13 19:40:42 +00:00
|
|
|
use Composer\Package\Locker;
|
|
|
|
use Composer\Test\Mock\FactoryMock;
|
|
|
|
use Composer\Test\Mock\InstalledFilesystemRepositoryMock;
|
2012-04-27 09:42:58 +00:00
|
|
|
use Composer\Test\Mock\InstallationManagerMock;
|
2012-05-27 22:11:18 +00:00
|
|
|
use Symfony\Component\Console\Input\StringInput;
|
|
|
|
use Symfony\Component\Console\Output\StreamOutput;
|
2013-09-25 08:14:42 +00:00
|
|
|
use Composer\TestCase;
|
2012-04-27 09:42:58 +00:00
|
|
|
|
|
|
|
class InstallerTest extends TestCase
|
|
|
|
{
|
2013-03-03 16:18:50 +00:00
|
|
|
protected $prevCwd;
|
|
|
|
|
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
$this->prevCwd = getcwd();
|
|
|
|
chdir(__DIR__);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function tearDown()
|
|
|
|
{
|
|
|
|
chdir($this->prevCwd);
|
|
|
|
}
|
|
|
|
|
2012-04-27 09:42:58 +00:00
|
|
|
/**
|
|
|
|
* @dataProvider provideInstaller
|
|
|
|
*/
|
2012-08-23 13:52:40 +00:00
|
|
|
public function testInstaller(RootPackageInterface $rootPackage, $repositories, array $options)
|
2012-04-27 09:42:58 +00:00
|
|
|
{
|
|
|
|
$io = $this->getMock('Composer\IO\IOInterface');
|
|
|
|
|
2014-02-24 17:40:33 +00:00
|
|
|
$downloadManager = $this->getMock('Composer\Downloader\DownloadManager', array(), array($io));
|
2012-04-27 09:42:58 +00:00
|
|
|
$config = $this->getMock('Composer\Config');
|
|
|
|
|
|
|
|
$repositoryManager = new RepositoryManager($io, $config);
|
2013-04-28 20:32:46 +00:00
|
|
|
$repositoryManager->setLocalRepository(new InstalledArrayRepository());
|
2012-04-29 15:29:06 +00:00
|
|
|
|
|
|
|
if (!is_array($repositories)) {
|
|
|
|
$repositories = array($repositories);
|
|
|
|
}
|
|
|
|
foreach ($repositories as $repository) {
|
|
|
|
$repositoryManager->addRepository($repository);
|
|
|
|
}
|
2012-04-27 09:42:58 +00:00
|
|
|
|
|
|
|
$locker = $this->getMockBuilder('Composer\Package\Locker')->disableOriginalConstructor()->getMock();
|
|
|
|
$installationManager = new InstallationManagerMock();
|
2013-01-06 19:34:52 +00:00
|
|
|
|
2013-08-14 15:42:11 +00:00
|
|
|
$eventDispatcher = $this->getMockBuilder('Composer\EventDispatcher\EventDispatcher')->disableOriginalConstructor()->getMock();
|
2013-01-06 19:34:52 +00:00
|
|
|
$autoloadGenerator = $this->getMockBuilder('Composer\Autoload\AutoloadGenerator')->disableOriginalConstructor()->getMock();
|
2012-04-27 09:42:58 +00:00
|
|
|
|
2012-06-24 19:58:51 +00:00
|
|
|
$installer = new Installer($io, $config, clone $rootPackage, $downloadManager, $repositoryManager, $locker, $installationManager, $eventDispatcher, $autoloadGenerator);
|
2012-04-27 09:42:58 +00:00
|
|
|
$result = $installer->run();
|
2013-11-22 15:17:02 +00:00
|
|
|
$this->assertSame(0, $result);
|
2012-04-27 09:42:58 +00:00
|
|
|
|
2012-04-29 15:29:06 +00:00
|
|
|
$expectedInstalled = isset($options['install']) ? $options['install'] : array();
|
|
|
|
$expectedUpdated = isset($options['update']) ? $options['update'] : array();
|
|
|
|
$expectedUninstalled = isset($options['uninstall']) ? $options['uninstall'] : array();
|
|
|
|
|
2012-04-27 09:42:58 +00:00
|
|
|
$installed = $installationManager->getInstalledPackages();
|
2012-04-29 15:29:06 +00:00
|
|
|
$this->assertSame($expectedInstalled, $installed);
|
2012-04-27 09:42:58 +00:00
|
|
|
|
|
|
|
$updated = $installationManager->getUpdatedPackages();
|
2012-04-29 15:29:06 +00:00
|
|
|
$this->assertSame($expectedUpdated, $updated);
|
2012-04-27 09:42:58 +00:00
|
|
|
|
|
|
|
$uninstalled = $installationManager->getUninstalledPackages();
|
2012-04-29 15:29:06 +00:00
|
|
|
$this->assertSame($expectedUninstalled, $uninstalled);
|
2012-04-27 09:42:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function provideInstaller()
|
|
|
|
{
|
|
|
|
$cases = array();
|
|
|
|
|
|
|
|
// when A requires B and B requires A, and A is a non-published root package
|
|
|
|
// the install of B should succeed
|
|
|
|
|
2012-08-23 13:52:40 +00:00
|
|
|
$a = $this->getPackage('A', '1.0.0', 'Composer\Package\RootPackage');
|
2012-04-27 09:42:58 +00:00
|
|
|
$a->setRequires(array(
|
|
|
|
new Link('A', 'B', $this->getVersionConstraint('=', '1.0.0')),
|
|
|
|
));
|
|
|
|
$b = $this->getPackage('B', '1.0.0');
|
|
|
|
$b->setRequires(array(
|
|
|
|
new Link('B', 'A', $this->getVersionConstraint('=', '1.0.0')),
|
|
|
|
));
|
|
|
|
|
|
|
|
$cases[] = array(
|
|
|
|
$a,
|
|
|
|
new ArrayRepository(array($b)),
|
2012-04-29 15:29:06 +00:00
|
|
|
array(
|
2015-09-28 09:51:14 +00:00
|
|
|
'install' => array($b),
|
2012-04-29 15:29:06 +00:00
|
|
|
),
|
2012-04-27 09:42:58 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
// #480: when A requires B and B requires A, and A is a published root package
|
|
|
|
// only B should be installed, as A is the root
|
|
|
|
|
2012-08-23 13:52:40 +00:00
|
|
|
$a = $this->getPackage('A', '1.0.0', 'Composer\Package\RootPackage');
|
2012-04-27 09:42:58 +00:00
|
|
|
$a->setRequires(array(
|
|
|
|
new Link('A', 'B', $this->getVersionConstraint('=', '1.0.0')),
|
|
|
|
));
|
|
|
|
$b = $this->getPackage('B', '1.0.0');
|
|
|
|
$b->setRequires(array(
|
|
|
|
new Link('B', 'A', $this->getVersionConstraint('=', '1.0.0')),
|
|
|
|
));
|
|
|
|
|
|
|
|
$cases[] = array(
|
|
|
|
$a,
|
|
|
|
new ArrayRepository(array($a, $b)),
|
2012-04-29 15:29:06 +00:00
|
|
|
array(
|
2015-09-28 09:51:14 +00:00
|
|
|
'install' => array($b),
|
2012-04-29 15:29:06 +00:00
|
|
|
),
|
2012-04-27 09:42:58 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
return $cases;
|
|
|
|
}
|
2012-05-13 19:40:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @dataProvider getIntegrationTests
|
|
|
|
*/
|
2016-01-27 12:46:14 +00:00
|
|
|
public function testIntegration($file, $message, $condition, $composerConfig, $lock, $installed, $run, $expectLock, $expectOutput, $expect, $expectResult)
|
2012-05-13 19:40:42 +00:00
|
|
|
{
|
|
|
|
if ($condition) {
|
|
|
|
eval('$res = '.$condition.';');
|
|
|
|
if (!$res) {
|
|
|
|
$this->markTestSkipped($condition);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-05-23 09:07:04 +00:00
|
|
|
$output = null;
|
2012-05-13 19:40:42 +00:00
|
|
|
$io = $this->getMock('Composer\IO\IOInterface');
|
2015-02-06 12:52:44 +00:00
|
|
|
$callback = function ($text, $newline) use (&$output) {
|
|
|
|
$output .= $text . ($newline ? "\n" : "");
|
|
|
|
};
|
2012-05-23 09:07:04 +00:00
|
|
|
$io->expects($this->any())
|
|
|
|
->method('write')
|
2015-02-06 12:52:44 +00:00
|
|
|
->will($this->returnCallback($callback));
|
|
|
|
$io->expects($this->any())
|
|
|
|
->method('writeError')
|
|
|
|
->will($this->returnCallback($callback));
|
2012-05-13 19:40:42 +00:00
|
|
|
|
2016-01-27 09:04:45 +00:00
|
|
|
// Prepare for exceptions
|
2016-01-27 12:46:14 +00:00
|
|
|
if (is_int($expectResult) || ctype_digit($expectResult)) {
|
|
|
|
$expectResult = (int) $expectResult;
|
2016-01-27 12:19:08 +00:00
|
|
|
} else {
|
|
|
|
$normalizedOutput = rtrim(str_replace("\n", PHP_EOL, $expect));
|
2016-01-27 12:46:14 +00:00
|
|
|
$this->setExpectedException($expectResult, $normalizedOutput);
|
2016-01-27 12:19:08 +00:00
|
|
|
}
|
2012-05-13 19:40:42 +00:00
|
|
|
|
2016-01-27 12:19:08 +00:00
|
|
|
// Create Composer mock object according to configuration
|
|
|
|
$composer = FactoryMock::create($io, $composerConfig);
|
|
|
|
|
|
|
|
$jsonMock = $this->getMockBuilder('Composer\Json\JsonFile')->disableOriginalConstructor()->getMock();
|
|
|
|
$jsonMock->expects($this->any())
|
|
|
|
->method('read')
|
|
|
|
->will($this->returnValue($installed));
|
|
|
|
$jsonMock->expects($this->any())
|
|
|
|
->method('exists')
|
|
|
|
->will($this->returnValue(true));
|
|
|
|
|
|
|
|
$repositoryManager = $composer->getRepositoryManager();
|
|
|
|
$repositoryManager->setLocalRepository(new InstalledFilesystemRepositoryMock($jsonMock));
|
|
|
|
|
|
|
|
$lockJsonMock = $this->getMockBuilder('Composer\Json\JsonFile')->disableOriginalConstructor()->getMock();
|
|
|
|
$lockJsonMock->expects($this->any())
|
|
|
|
->method('read')
|
|
|
|
->will($this->returnValue($lock));
|
|
|
|
$lockJsonMock->expects($this->any())
|
|
|
|
->method('exists')
|
|
|
|
->will($this->returnValue(true));
|
|
|
|
|
|
|
|
if ($expectLock) {
|
|
|
|
$actualLock = array();
|
|
|
|
$lockJsonMock->expects($this->atLeastOnce())
|
|
|
|
->method('write')
|
|
|
|
->will($this->returnCallback(function ($hash, $options) use (&$actualLock) {
|
|
|
|
// need to do assertion outside of mock for nice phpunit output
|
|
|
|
// so store value temporarily in reference for later assetion
|
|
|
|
$actualLock = $hash;
|
|
|
|
}));
|
|
|
|
}
|
2012-05-27 22:11:18 +00:00
|
|
|
|
2016-01-27 12:19:08 +00:00
|
|
|
$contents = json_encode($composerConfig);
|
|
|
|
$locker = new Locker($io, $lockJsonMock, $repositoryManager, $composer->getInstallationManager(), $contents);
|
|
|
|
$composer->setLocker($locker);
|
2012-07-01 16:27:16 +00:00
|
|
|
|
2016-01-27 12:19:08 +00:00
|
|
|
$eventDispatcher = $this->getMockBuilder('Composer\EventDispatcher\EventDispatcher')->disableOriginalConstructor()->getMock();
|
|
|
|
$autoloadGenerator = $this->getMock('Composer\Autoload\AutoloadGenerator', array(), array($eventDispatcher));
|
|
|
|
$composer->setAutoloadGenerator($autoloadGenerator);
|
|
|
|
$composer->setEventDispatcher($eventDispatcher);
|
|
|
|
|
|
|
|
$installer = Installer::create($io, $composer);
|
|
|
|
|
|
|
|
$application = new Application;
|
|
|
|
$application->get('install')->setCode(function ($input, $output) use ($installer) {
|
|
|
|
$installer
|
|
|
|
->setDevMode(!$input->getOption('no-dev'))
|
|
|
|
->setDryRun($input->getOption('dry-run'))
|
|
|
|
->setIgnorePlatformRequirements($input->getOption('ignore-platform-reqs'));
|
|
|
|
|
|
|
|
return $installer->run();
|
|
|
|
});
|
|
|
|
|
|
|
|
$application->get('update')->setCode(function ($input, $output) use ($installer) {
|
|
|
|
$installer
|
|
|
|
->setDevMode(!$input->getOption('no-dev'))
|
|
|
|
->setUpdate(true)
|
|
|
|
->setDryRun($input->getOption('dry-run'))
|
|
|
|
->setUpdateWhitelist($input->getArgument('packages'))
|
|
|
|
->setWhitelistDependencies($input->getOption('with-dependencies'))
|
|
|
|
->setPreferStable($input->getOption('prefer-stable'))
|
|
|
|
->setPreferLowest($input->getOption('prefer-lowest'))
|
|
|
|
->setIgnorePlatformRequirements($input->getOption('ignore-platform-reqs'));
|
|
|
|
|
|
|
|
return $installer->run();
|
|
|
|
});
|
|
|
|
|
|
|
|
if (!preg_match('{^(install|update)\b}', $run)) {
|
|
|
|
throw new \UnexpectedValueException('The run command only supports install and update');
|
|
|
|
}
|
2012-09-05 18:39:45 +00:00
|
|
|
|
2016-01-27 12:19:08 +00:00
|
|
|
$application->setAutoExit(false);
|
|
|
|
$appOutput = fopen('php://memory', 'w+');
|
|
|
|
$result = $application->run(new StringInput($run), new StreamOutput($appOutput));
|
|
|
|
fseek($appOutput, 0);
|
2016-01-27 12:46:14 +00:00
|
|
|
if (!is_int($expectResult)) {
|
2016-01-27 12:19:08 +00:00
|
|
|
// Shouldn't check output and results if an exception was expected by this point
|
|
|
|
return;
|
2016-01-27 09:04:45 +00:00
|
|
|
}
|
2016-01-27 12:19:08 +00:00
|
|
|
|
2016-01-27 12:46:14 +00:00
|
|
|
$this->assertEquals($expectResult, $result, $output . stream_get_contents($appOutput));
|
2016-01-27 12:19:08 +00:00
|
|
|
if ($expectLock) {
|
|
|
|
unset($actualLock['hash']);
|
|
|
|
unset($actualLock['content-hash']);
|
|
|
|
unset($actualLock['_readme']);
|
|
|
|
$this->assertEquals($expectLock, $actualLock);
|
|
|
|
}
|
|
|
|
|
|
|
|
$installationManager = $composer->getInstallationManager();
|
|
|
|
$this->assertSame(rtrim($expect), implode("\n", $installationManager->getTrace()));
|
|
|
|
|
|
|
|
if ($expectOutput) {
|
|
|
|
$this->assertEquals(rtrim($expectOutput), rtrim($output));
|
2012-09-05 18:39:45 +00:00
|
|
|
}
|
2012-05-13 19:40:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getIntegrationTests()
|
|
|
|
{
|
|
|
|
$fixturesDir = realpath(__DIR__.'/Fixtures/installer/');
|
|
|
|
$tests = array();
|
|
|
|
|
|
|
|
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($fixturesDir), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
|
2014-02-21 12:41:21 +00:00
|
|
|
if (!preg_match('/\.test$/', $file)) {
|
2012-05-13 19:40:42 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2015-01-27 15:56:39 +00:00
|
|
|
$testData = $this->readTestFile($file, $fixturesDir);
|
2012-05-13 19:40:42 +00:00
|
|
|
|
|
|
|
$installed = array();
|
|
|
|
$installedDev = array();
|
|
|
|
$lock = array();
|
2012-07-01 16:27:16 +00:00
|
|
|
$expectLock = array();
|
2016-01-27 12:46:14 +00:00
|
|
|
$expectResult = 0;
|
2012-05-13 19:40:42 +00:00
|
|
|
|
2015-01-27 15:56:39 +00:00
|
|
|
try {
|
|
|
|
$message = $testData['TEST'];
|
|
|
|
$condition = !empty($testData['CONDITION']) ? $testData['CONDITION'] : null;
|
|
|
|
$composer = JsonFile::parseJson($testData['COMPOSER']);
|
2014-11-20 15:41:29 +00:00
|
|
|
|
2015-01-27 15:56:39 +00:00
|
|
|
if (isset($composer['repositories'])) {
|
|
|
|
foreach ($composer['repositories'] as &$repo) {
|
|
|
|
if ($repo['type'] !== 'composer') {
|
|
|
|
continue;
|
2014-11-20 15:41:29 +00:00
|
|
|
}
|
|
|
|
|
2015-01-27 15:56:39 +00:00
|
|
|
// Change paths like file://foobar to file:///path/to/fixtures
|
|
|
|
if (preg_match('{^file://[^/]}', $repo['url'])) {
|
|
|
|
$repo['url'] = 'file://' . strtr($fixturesDir, '\\', '/') . '/' . substr($repo['url'], 7);
|
2012-05-28 16:57:59 +00:00
|
|
|
}
|
2015-01-27 15:56:39 +00:00
|
|
|
|
|
|
|
unset($repo);
|
2012-05-13 19:40:42 +00:00
|
|
|
}
|
2015-01-27 15:56:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!empty($testData['LOCK'])) {
|
|
|
|
$lock = JsonFile::parseJson($testData['LOCK']);
|
|
|
|
if (!isset($lock['hash'])) {
|
|
|
|
$lock['hash'] = md5(json_encode($composer));
|
2012-07-01 16:27:16 +00:00
|
|
|
}
|
2012-05-13 19:40:42 +00:00
|
|
|
}
|
2015-01-27 15:56:39 +00:00
|
|
|
if (!empty($testData['INSTALLED'])) {
|
|
|
|
$installed = JsonFile::parseJson($testData['INSTALLED']);
|
|
|
|
}
|
|
|
|
$run = $testData['RUN'];
|
|
|
|
if (!empty($testData['EXPECT-LOCK'])) {
|
|
|
|
$expectLock = JsonFile::parseJson($testData['EXPECT-LOCK']);
|
|
|
|
}
|
|
|
|
$expectOutput = isset($testData['EXPECT-OUTPUT']) ? $testData['EXPECT-OUTPUT'] : null;
|
|
|
|
$expect = $testData['EXPECT'];
|
2016-01-27 12:46:14 +00:00
|
|
|
if (!empty($testData['EXPECT-EXCEPTION'])) {
|
|
|
|
$expectResult = $testData['EXPECT-EXCEPTION'];
|
|
|
|
if (!empty($testData['EXPECT-EXIT-CODE'])) {
|
|
|
|
throw new \LogicException('EXPECT-EXCEPTION and EXPECT-EXIT-CODE are mutually exclusive');
|
|
|
|
}
|
|
|
|
} elseif (!empty($testData['EXPECT-EXIT-CODE'])) {
|
|
|
|
$expectResult = (int) $testData['EXPECT-EXIT-CODE'];
|
|
|
|
} else {
|
|
|
|
$expectResult = 0;
|
|
|
|
}
|
2015-01-27 15:56:39 +00:00
|
|
|
} catch (\Exception $e) {
|
|
|
|
die(sprintf('Test "%s" is not valid: '.$e->getMessage(), str_replace($fixturesDir.'/', '', $file)));
|
2012-05-13 19:40:42 +00:00
|
|
|
}
|
|
|
|
|
2016-01-27 12:46:14 +00:00
|
|
|
$tests[basename($file)] = array(str_replace($fixturesDir.'/', '', $file), $message, $condition, $composer, $lock, $installed, $run, $expectLock, $expectOutput, $expect, $expectResult);
|
2012-05-13 19:40:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return $tests;
|
|
|
|
}
|
2015-01-27 15:56:39 +00:00
|
|
|
|
|
|
|
protected function readTestFile(\SplFileInfo $file, $fixturesDir)
|
|
|
|
{
|
|
|
|
$tokens = preg_split('#(?:^|\n*)--([A-Z-]+)--\n#', file_get_contents($file->getRealPath()), null, PREG_SPLIT_DELIM_CAPTURE);
|
|
|
|
|
|
|
|
$sectionInfo = array(
|
|
|
|
'TEST' => true,
|
|
|
|
'CONDITION' => false,
|
|
|
|
'COMPOSER' => true,
|
|
|
|
'LOCK' => false,
|
|
|
|
'INSTALLED' => false,
|
|
|
|
'RUN' => true,
|
|
|
|
'EXPECT-LOCK' => false,
|
|
|
|
'EXPECT-OUTPUT' => false,
|
|
|
|
'EXPECT-EXIT-CODE' => false,
|
2016-01-27 12:46:14 +00:00
|
|
|
'EXPECT-EXCEPTION' => false,
|
2015-01-27 15:56:39 +00:00
|
|
|
'EXPECT' => true,
|
|
|
|
);
|
|
|
|
|
|
|
|
$section = null;
|
2015-02-24 14:22:54 +00:00
|
|
|
foreach ($tokens as $i => $token) {
|
2015-01-27 15:56:39 +00:00
|
|
|
if (null === $section && empty($token)) {
|
|
|
|
continue; // skip leading blank
|
|
|
|
}
|
|
|
|
|
|
|
|
if (null === $section) {
|
|
|
|
if (!isset($sectionInfo[$token])) {
|
|
|
|
throw new \RuntimeException(sprintf(
|
|
|
|
'The test file "%s" must not contain a section named "%s".',
|
|
|
|
str_replace($fixturesDir.'/', '', $file),
|
|
|
|
$token
|
|
|
|
));
|
|
|
|
}
|
|
|
|
$section = $token;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
$sectionData = $token;
|
|
|
|
|
|
|
|
$data[$section] = $sectionData;
|
|
|
|
$section = $sectionData = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($sectionInfo as $section => $required) {
|
|
|
|
if ($required && !isset($data[$section])) {
|
|
|
|
throw new \RuntimeException(sprintf(
|
|
|
|
'The test file "%s" must have a section named "%s".',
|
|
|
|
str_replace($fixturesDir.'/', '', $file),
|
|
|
|
$section
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return $data;
|
|
|
|
}
|
2012-04-27 09:42:58 +00:00
|
|
|
}
|