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