Nelmio\Alice\Generator\Instantiator\Chainable\NullConstructorInstantiator::canInstantiate PHP Метод

canInstantiate() публичный Метод

public canInstantiate ( Nelmio\Alice\FixtureInterface $fixture ) : boolean
$fixture Nelmio\Alice\FixtureInterface
Результат boolean
    public function canInstantiate(FixtureInterface $fixture) : bool
    {
        return null === $fixture->getSpecs()->getConstructor();
    }

Usage Example

 public function testCanInstantiateFixtureUsingADefaultConstructor()
 {
     $fixture = new SimpleFixture('dummy', 'Nelmio\\Alice\\Entity\\User', SpecificationBagFactory::create());
     $this->assertTrue($this->instantiator->canInstantiate($fixture));
 }
NullConstructorInstantiator