/** * As the specs are not overridden and starting the from loaded fixture, when resolving a fixture to inherit the * properties of the extended fixtures, the specs should be merged with the last extended fixture to the first one. * For this purpose, the list of extended fixtures is given in the right order right away. */ public function testExtendedFixturesOrderIsInversed() { $templating = new Templating($this->createFixtureWithFlags((new FlagBag(''))->withFlag(new ExtendFlag(new FixtureReference('user_base0')))->withFlag(new ExtendFlag(new FixtureReference('user_base1'))))); $expected = [new FixtureReference('user_base1'), new FixtureReference('user_base0')]; $actual = $templating->getExtendedFixtures(); $this->assertEquals(count($expected), count($actual)); foreach ($expected as $index => $expectedReference) { $this->assertEquals($expectedReference, $actual[$index]); } }
/** * @return FixtureReference[] List of fixture ids that the fixture extends. */ public function getExtendedFixturesReferences() : array { return $this->templating->getExtendedFixtures(); }