示例#1
0
 /**
  * @testdox The cache of the loader
  */
 public function testGenerationCache()
 {
     // This loading will trigger the caching part of the FixtureWildcardReferenceResolver to
     // cache the pattern for `@another*`
     $this->nonIsolatedLoader->loadData(['parameters' => [], \stdClass::class => ['another_dummy' => [], 'dummy' => ['related' => '@another*']]], [], []);
     // This loading will also the caching part of the FixtureWildcardReferenceResolver. The
     // cache having the same lifetime as the generation context is what ensures the cache from
     // the previous loading will not interfer with this one
     $this->nonIsolatedLoader->loadData(['parameters' => [], \stdClass::class => ['another_dummy_new' => [], 'dummy' => ['related' => '@another*']]], [], []);
 }
示例#2
0
 /**
  * @expectedException \Nelmio\Alice\Throwable\Exception\FixtureNotFoundException
  */
 public function testLoadParsesReferencesInQuotes()
 {
     $this->loader->loadData([\stdClass::class => ['dummy1' => ['name' => 'foo'], 'dummy2' => ['dummy' => '\'@dummy1\'']]]);
 }
示例#3
0
 /**
  * @inheritdoc
  */
 public function loadFile(string $file, array $parameters = [], array $objects = []) : ObjectSet
 {
     return $this->fileLoader->loadFile($file, $parameters, $objects);
 }