$this->
expectException(\RuntimeException::
class);
$builder =
new BaseNodeBuilder();
$builder->
node('', 'foobar'
);
} public function testThrowsAnExceptionWhenTheNodeClassIsNotFound() { $this->
expectException(\RuntimeException::
class);
$builder =
new BaseNodeBuilder();
$builder ->
setNodeClass('noclasstype', '\\foo\\bar\\noclass'
) ->
node('', 'noclasstype'
);
} public function testAddingANewNodeType() { $class = SomeNodeDefinition::
class;
$builder =
new BaseNodeBuilder();
$node =
$builder ->
setNodeClass('newtype',
$class) ->
node('', 'newtype'
);