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

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

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

Usage Example

Пример #1
0
 public function testCannotInstantiateFixtureWithDefaultConstructor()
 {
     $fixture = new SimpleFixture('dummy', 'Dummy', SpecificationBagFactory::create());
     $this->assertFalse($this->instantiator->canInstantiate($fixture));
 }
NoMethodCallInstantiator