BUG 0000 "PHPUNIT instantiation classwsResponseTest.php" SOLVED
- Instantiation of the class - Formatting file to PSR2
This commit is contained in:
@@ -26,7 +26,7 @@ class classwsResponseTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->object = new wsResponse();
|
$this->object = new wsResponse(0, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,12 +38,13 @@ class classwsResponseTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the default method to test, if the class still having
|
* This is the default method to test, if the class still having
|
||||||
* the same number of methods.
|
* the same number of methods.
|
||||||
*/
|
*/
|
||||||
public function testNumberOfMethodsInThisClass()
|
public function testNumberOfMethodsInThisClass()
|
||||||
{
|
{
|
||||||
$methods = get_class_methods('wsResponse'); $this->assertTrue( count($methods) == 3);
|
$methods = get_class_methods('wsResponse');
|
||||||
|
$this->assertTrue(count($methods) == 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -62,7 +63,7 @@ class classwsResponseTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[1]->getName() == 'message');
|
$this->assertTrue( $params[1]->getName() == 'message');
|
||||||
$this->assertTrue( $params[1]->isArray() == false);
|
$this->assertTrue( $params[1]->isArray() == false);
|
||||||
$this->assertTrue( $params[1]->isOptional () == false);
|
$this->assertTrue( $params[1]->isOptional () == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers wsResponse::getPayloadString
|
* @covers wsResponse::getPayloadString
|
||||||
@@ -77,7 +78,7 @@ class classwsResponseTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[0]->getName() == 'operation');
|
$this->assertTrue( $params[0]->getName() == 'operation');
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
$this->assertTrue( $params[0]->isArray() == false);
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
$this->assertTrue( $params[0]->isOptional () == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers wsResponse::getPayloadArray
|
* @covers wsResponse::getPayloadArray
|
||||||
@@ -89,6 +90,6 @@ class classwsResponseTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('getPayloadArray', $methods ), 'exists method getPayloadArray' );
|
$this->assertTrue( in_array('getPayloadArray', $methods ), 'exists method getPayloadArray' );
|
||||||
$r = new ReflectionMethod('wsResponse', 'getPayloadArray');
|
$r = new ReflectionMethod('wsResponse', 'getPayloadArray');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user