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.
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);
 }
Beispiel #2
0
 /**
  * @inheritdoc
  */
 public function loadFile(string $file, array $parameters = [], array $objects = []) : ObjectSet
 {
     return $this->fileLoader->loadFile($file, $parameters, $objects);
 }