Passage en Namespace et tous les tests fonctionnels OK
This commit is contained in:
@@ -7,14 +7,16 @@
|
||||
|
||||
namespace Domframework\Tests;
|
||||
|
||||
use Domframework\Rest;
|
||||
|
||||
/** Test the domframework REST part */
|
||||
class restTest extends \PHPUnit_Framework_TestCase
|
||||
class RestTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/** No param, JSON by default
|
||||
*/
|
||||
public function testChooseType1 ()
|
||||
{
|
||||
$rest = new \rest ();
|
||||
$rest = new Rest ();
|
||||
$res = $rest->chooseType ();
|
||||
$this->assertSame ($res, "json");
|
||||
}
|
||||
@@ -23,7 +25,7 @@ class restTest extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testChooseType2 ()
|
||||
{
|
||||
$rest = new \rest ();
|
||||
$rest = new Rest ();
|
||||
$rest->allowedtypes = array ("xml", "csv");
|
||||
$res = $rest->chooseType ();
|
||||
$this->assertSame ($res, "xml");
|
||||
@@ -33,7 +35,7 @@ class restTest extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testChooseType3 ()
|
||||
{
|
||||
$rest = new \rest ();
|
||||
$rest = new Rest ();
|
||||
$_SERVER["HTTP_ACCEPT"] = "text/html,application/xml;q=0.9,*/*;q=0.8";
|
||||
$res = $rest->chooseType ();
|
||||
$this->assertSame ($res, "xml");
|
||||
@@ -43,7 +45,7 @@ class restTest extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testChooseType4 ()
|
||||
{
|
||||
$rest = new \rest ();
|
||||
$rest = new Rest ();
|
||||
$_SERVER["HTTP_ACCEPT"] = "text/html;q=0.9,*/*;q=0.8";
|
||||
$res = $rest->chooseType ();
|
||||
$this->assertSame ($res, "json");
|
||||
@@ -54,7 +56,7 @@ class restTest extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testChooseType5 ()
|
||||
{
|
||||
$rest = new \rest ();
|
||||
$rest = new Rest ();
|
||||
$rest->allowedtypes = array ("xml", "csv");
|
||||
$_SERVER["HTTP_ACCEPT"] = "text/html;q=0.9,*/*;q=0.8";
|
||||
$res = $rest->chooseType ();
|
||||
|
||||
Reference in New Issue
Block a user