public function load($resource, $type = null) { $config = (include $resource); if (!is_array($config)) { throw new \InvalidArgumentException(sprintf('The file "%s" did not return a valid PHP array when included', $resource)); } return $config; }
public function testLoadsPhpArrayConfigFromFile() { $this->assertSame(include __DIR__ . '/../../../Fixtures/fixture_config.php', $this->loader->load(__DIR__ . '/../../../Fixtures/fixture_config.php')); }