BUG 0000 "PHPUNIT instantiation classpluginDetailTest.php" SOLVED
- Instantiation of the class - Formatting file to PSR2
This commit is contained in:
@@ -26,7 +26,7 @@ class classpluginDetailTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->object = new pluginDetail();
|
$this->object = new pluginDetail("enterprise", "enterpriseplugin", __FILE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,7 +43,8 @@ class classpluginDetailTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testNumberOfMethodsInThisClass()
|
public function testNumberOfMethodsInThisClass()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods('pluginDetail'); $this->assertTrue( count($methods) == 1);
|
$methods = get_class_methods('pluginDetail');
|
||||||
|
$this->assertTrue(count($methods) == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,6 +56,7 @@ class classpluginDetailTest extends PHPUnit_Framework_TestCase
|
|||||||
$methods = get_class_methods($this->object);
|
$methods = get_class_methods($this->object);
|
||||||
$this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' );
|
$this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' );
|
||||||
$r = new ReflectionMethod('pluginDetail', '__construct');
|
$r = new ReflectionMethod('pluginDetail', '__construct');
|
||||||
|
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
$this->assertTrue($params[0]->getName() == 'sNamespace');
|
$this->assertTrue($params[0]->getName() == 'sNamespace');
|
||||||
$this->assertTrue($params[0]->isArray() == false);
|
$this->assertTrue($params[0]->isArray() == false);
|
||||||
@@ -86,5 +88,5 @@ class classpluginDetailTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($params[7]->isOptional() == true);
|
$this->assertTrue($params[7]->isOptional() == true);
|
||||||
$this->assertTrue($params[7]->getDefaultValue() == '0');
|
$this->assertTrue($params[7]->getDefaultValue() == '0');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user