Nelmio\Alice\FileLoaderInterface::loadFile PHP Method

loadFile() public method

Loads a fixture file.
public loadFile ( string $file, array $parameters = [], array $objects = [] ) : ObjectSet
$file string File to load.
$parameters array Additional parameters to inject.
$objects array Additional objects to inject.
return ObjectSet Contains the list of objects and parameters loaded and injected.
    public function loadFile(string $file, array $parameters = [], array $objects = []) : ObjectSet;

Usage Example

Beispiel #1
0
 public function testTemplatesAreKeptBetweenFiles()
 {
     $expected = new ObjectSet(new ParameterBag(), new ObjectBag(['dummy' => StdClassFactory::create(['foo' => 'bar'])]));
     $actual = $this->loader->loadFile(self::FIXTURES_FILES_DIR . '/template_in_another_file/dummy.yml');
     $this->assertEquals($expected, $actual);
 }
All Usage Examples Of Nelmio\Alice\FileLoaderInterface::loadFile
FileLoaderInterface