2012-03-10 17:56:56 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class PHPParser_Tests_BuilderFactoryTest extends PHPUnit_Framework_TestCase
|
|
|
|
{
|
|
|
|
public function testCreateClassBuilder() {
|
|
|
|
$factory = new PHPParser_BuilderFactory;
|
2012-03-10 23:25:26 +01:00
|
|
|
$this->assertInstanceOf('PHPParser_Builder_Class', $factory->class('Test'));
|
|
|
|
}
|
2012-03-10 17:56:56 +01:00
|
|
|
|
2012-03-10 23:25:26 +01:00
|
|
|
public function testCreateMethodBuilder() {
|
|
|
|
$factory = new PHPParser_BuilderFactory;
|
|
|
|
$this->assertInstanceOf('PHPParser_Builder_Method', $factory->method('test'));
|
2012-03-10 17:56:56 +01:00
|
|
|
}
|
2012-03-11 00:06:02 +01:00
|
|
|
|
|
|
|
public function testCreateParamBuilder() {
|
|
|
|
$factory = new PHPParser_BuilderFactory;
|
|
|
|
$this->assertInstanceOf('PHPParser_Builder_Param', $factory->param('test'));
|
|
|
|
}
|
2012-03-11 08:42:13 +01:00
|
|
|
|
|
|
|
public function testCreatePropertyBuilder() {
|
|
|
|
$factory = new PHPParser_BuilderFactory;
|
|
|
|
$this->assertInstanceOf('PHPParser_Builder_Property', $factory->property('test'));
|
|
|
|
}
|
2012-03-11 09:02:52 +01:00
|
|
|
|
|
|
|
public function testCreateFunctionBuilder() {
|
|
|
|
$factory = new PHPParser_BuilderFactory;
|
|
|
|
$this->assertInstanceOf('PHPParser_Builder_Function', $factory->function('test'));
|
|
|
|
}
|
2012-03-10 17:56:56 +01:00
|
|
|
}
|