Example #1
0
 /**
  * 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 testBuildFunctionThrowsExpectedExceptionWhenStateIsFrozen()
 {
     $builder = new PHP_Depend_Builder_Default();
     $builder->buildFunction('func');
     // Freeze object
     $builder->getInterface('Inter');
     $this->setExpectedException('BadMethodCallException', 'Cannot create new nodes, when internal state is frozen.');
     $builder->buildFunction('prop');
 }