withSpecs() public method

public withSpecs ( SpecificationBag $specs ) : self
$specs Nelmio\Alice\Definition\SpecificationBag
return self
Example #1
0
 public function getExtendedFixture(TemplatingFixture $fixture, FixtureBag $extendedFixtures)
 {
     $specs = $fixture->getSpecs();
     foreach ($extendedFixtures as $extendedFixture) {
         /** @var FixtureInterface $extendedFixture */
         $specs = $specs->mergeWith($extendedFixture->getSpecs());
     }
     return $fixture->withSpecs($specs);
 }