/** * 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 testBuildASTClassReferenceThrowsExpectedExceptionWhenStateIsFrozen() { $builder = new PHP_Depend_Builder_Default(); $builder->buildASTClassReference('Foo'); // Freeze object $builder->getClass('Foo'); $this->setExpectedException('BadMethodCallException', 'Cannot create new nodes, when internal state is frozen.'); $builder->buildASTClassReference('Bar'); }