php-parser/test/PHPParser/Tests/BuilderFactoryTest.php

13 lines
393 B
PHP
Raw Normal View History

2012-03-10 17:56:56 +01:00
<?php
class PHPParser_Tests_BuilderFactoryTest extends PHPUnit_Framework_TestCase
{
public function testCreateClassBuilder() {
$factory = new PHPParser_BuilderFactory;
$builder = $factory->class('Test');
$this->assertInstanceOf('PHPParser_Builder_Class', $builder);
$this->assertEquals(new PHPParser_Node_Stmt_Class('Test'), $builder->getNode());
}
}