Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ php:
- 5.6
- 7.0
- 7.1
- 7.2

before_script:
- composer install --dev
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
}
},
"require": {
"php": ">=5.4.0"
"php": ">=5.6.0"
},
"require-dev": {
"satooshi/php-coveralls": "^1.0",
"phpunit/phpunit": "^5.0"
"phpunit/phpunit": "^5.0|^6.5"
}
}
7 changes: 4 additions & 3 deletions test/Dispatcher/DispatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Phroute\Phroute\RouteParser;
use Phroute\Phroute\Dispatcher;
use Phroute\Phroute\Route;
use PHPUnit\Framework\TestCase;

class Test {

Expand Down Expand Up @@ -90,7 +91,7 @@ public function getParameterOptionalRequired($param, $param2 = 'default')
}
}

class DispatcherTest extends \PHPUnit_Framework_TestCase {
class DispatcherTest extends TestCase {

/**
* Set appropriate options for the specific Dispatcher class we're testing
Expand Down Expand Up @@ -130,11 +131,11 @@ public function testNotFoundDispatches($method, $uri, $callback)

/**
* @dataProvider provideMethodNotAllowedDispatchCases
* @expectedException Phroute\Phroute\Exception\HttpMethodNotAllowedException
* @expectedExceptionMessage Allow: GET
*/
public function testMethodNotAllowedDispatches($method, $uri, $callback, $allowed)
{
$this->setExpectedException('\Phroute\Phroute\Exception\HttpMethodNotAllowedException',"Allow: " . implode(', ', $allowed));

$r = $this->router();
$callback($r);
$this->dispatch($r, $method, $uri);
Expand Down