Merge pull request #291 from victorsl/master

BUG 0000 "PHPUNIT instantiation classPMScriptTest.php" SOLVED
This commit is contained in:
julceslauhub
2012-07-13 16:15:07 -07:00
2 changed files with 24 additions and 22 deletions

View File

@@ -26,7 +26,7 @@ class classFileCacheTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new FileCache();
$this->object = new FileCache(null);
}
/**
@@ -43,7 +43,8 @@ class classFileCacheTest extends PHPUnit_Framework_TestCase
*/
public function testNumberOfMethodsInThisClass()
{
$methods = get_class_methods('FileCache'); $this->assertTrue( count($methods) == 4);
$methods = get_class_methods('FileCache');
$this->assertTrue(count($methods) == 4);
}
/**
@@ -112,5 +113,5 @@ class classFileCacheTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
}

View File

@@ -43,7 +43,8 @@ class classPMScriptTest extends PHPUnit_Framework_TestCase
*/
public function testNumberOfMethodsInThisClass()
{
$methods = get_class_methods('PMScript'); $this->assertTrue( count($methods) == 7);
$methods = get_class_methods('PMScript');
$this->assertTrue(count($methods) == 7);
}
/**
@@ -68,10 +69,10 @@ class classPMScriptTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('setFields', $methods ), 'exists method setFields' );
$r = new ReflectionMethod('PMScript', 'setFields');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'aFields');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == 'Array');
$this->assertTrue($params[0]->getName() == 'aFields');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional () == true);
$this->assertTrue($params[0]->getDefaultValue() == array());
}
/**
@@ -146,5 +147,5 @@ class classPMScriptTest extends PHPUnit_Framework_TestCase
$r = new ReflectionMethod('PMScript', 'evaluate');
$params = $r->getParameters();
}
}
}