summaryrefslogtreecommitdiffstats
path: root/tests/lib/appframework/http/DispatcherTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/appframework/http/DispatcherTest.php')
-rw-r--r--tests/lib/appframework/http/DispatcherTest.php29
1 files changed, 10 insertions, 19 deletions
diff --git a/tests/lib/appframework/http/DispatcherTest.php b/tests/lib/appframework/http/DispatcherTest.php
index f082ddc8b3a..3933e00804b 100644
--- a/tests/lib/appframework/http/DispatcherTest.php
+++ b/tests/lib/appframework/http/DispatcherTest.php
@@ -62,9 +62,7 @@ class TestController extends Controller {
}
-class DispatcherTest extends \PHPUnit_Framework_TestCase {
-
-
+class DispatcherTest extends \Test\TestCase {
private $middlewareDispatcher;
private $dispatcher;
private $controllerMethod;
@@ -75,6 +73,7 @@ class DispatcherTest extends \PHPUnit_Framework_TestCase {
private $reflector;
protected function setUp() {
+ parent::setUp();
$this->controllerMethod = 'test';
$app = $this->getMockBuilder(
@@ -228,15 +227,11 @@ class DispatcherTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals($httpHeaders, $response[0]);
$this->assertEquals($responseHeaders, $response[1]);
- $this->assertEquals($out, $response[2]);
+ $this->assertEquals($out, $response[3]);
}
public function testExceptionCallsAfterException() {
- // TODO fails on PHP 5.3
- if (version_compare(PHP_VERSION, '5.4.0', '<')) {
- $this->markTestSkipped('Fails on PHP 5.3');
- }
$out = 'yo';
$httpHeaders = 'Http';
$responseHeaders = array('hell' => 'yeah');
@@ -247,15 +242,11 @@ class DispatcherTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals($httpHeaders, $response[0]);
$this->assertEquals($responseHeaders, $response[1]);
- $this->assertEquals($out, $response[2]);
+ $this->assertEquals($out, $response[3]);
}
public function testExceptionThrowsIfCanNotBeHandledByAfterException() {
- // TODO fails on PHP 5.3 and crashed travis (10 minute timeout)
- if (version_compare(PHP_VERSION, '5.4.0', '<')) {
- $this->markTestSkipped('Fails on PHP 5.3 and causes infinite loop - travis fails after 10 minute timeout');
- }
$out = 'yo';
$httpHeaders = 'Http';
$responseHeaders = array('hell' => 'yeah');
@@ -302,7 +293,7 @@ class DispatcherTest extends \PHPUnit_Framework_TestCase {
$this->dispatcherPassthrough();
$response = $this->dispatcher->dispatch($controller, 'exec');
- $this->assertEquals('[3,true,4,1]', $response[2]);
+ $this->assertEquals('[3,true,4,1]', $response[3]);
}
@@ -325,7 +316,7 @@ class DispatcherTest extends \PHPUnit_Framework_TestCase {
$this->dispatcherPassthrough();
$response = $this->dispatcher->dispatch($controller, 'exec');
- $this->assertEquals('[3,true,4,7]', $response[2]);
+ $this->assertEquals('[3,true,4,7]', $response[3]);
}
@@ -351,7 +342,7 @@ class DispatcherTest extends \PHPUnit_Framework_TestCase {
$this->dispatcherPassthrough();
$response = $this->dispatcher->dispatch($controller, 'exec');
- $this->assertEquals('{"text":[3,false,4,1]}', $response[2]);
+ $this->assertEquals('{"text":[3,false,4,1]}', $response[3]);
}
@@ -376,7 +367,7 @@ class DispatcherTest extends \PHPUnit_Framework_TestCase {
$this->dispatcherPassthrough();
$response = $this->dispatcher->dispatch($controller, 'execDataResponse');
- $this->assertEquals('{"text":[3,false,4,1]}', $response[2]);
+ $this->assertEquals('{"text":[3,false,4,1]}', $response[3]);
}
@@ -402,7 +393,7 @@ class DispatcherTest extends \PHPUnit_Framework_TestCase {
$this->dispatcherPassthrough();
$response = $this->dispatcher->dispatch($controller, 'exec');
- $this->assertEquals('{"text":[3,false,4,1]}', $response[2]);
+ $this->assertEquals('{"text":[3,false,4,1]}', $response[3]);
}
@@ -430,7 +421,7 @@ class DispatcherTest extends \PHPUnit_Framework_TestCase {
$this->dispatcherPassthrough();
$response = $this->dispatcher->dispatch($controller, 'exec');
- $this->assertEquals('{"text":[3,true,4,1]}', $response[2]);
+ $this->assertEquals('{"text":[3,true,4,1]}', $response[3]);
}