/** * Tests that the builder throws the expected exception when some one tries * to build a new node, when the internal state flag is frozen. * * @return void * @covers PHP_Depend_Builder_Default * @group pdepend * @group pdepend::builder * @group unittest */ public function testBuildClosureThrowsExpectedExceptionWhenStateIsFrozen() { $builder = new PHP_Depend_Builder_Default(); $builder->buildClosure('clo'); // Freeze object $builder->getClass('Foo'); $this->setExpectedException('BadMethodCallException', 'Cannot create new nodes, when internal state is frozen.'); $builder->buildClosure('sure'); }