File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed
Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+
3+ <phpunit colors =" true" convertErrorsToExceptions =" true" convertNoticesToExceptions =" true" convertWarningsToExceptions =" true" processIsolation =" false" stopOnFailure =" false" syntaxCheck =" false" bootstrap =" tests/bootstrap.php" >
4+ <testsuites >
5+ <testsuite name =" Router Tests" >
6+ <directory >tests/</directory >
7+ </testsuite >
8+ </testsuites >
9+ <filter >
10+ <whitelist >
11+ <directory suffix =" .php" >src/</directory >
12+ </whitelist >
13+ </filter >
14+ </phpunit >
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ class RouterTest extends PHPUnit_Framework_TestCase
4+ {
5+ protected function setUp ()
6+ {
7+ // Clear SCRIPT_NAME because bramus/router tries to guess the subfolder the script is run in
8+ $ _SERVER ['SCRIPT_NAME ' ] = '/index.php ' ;
9+
10+ // Default request method to GET
11+ $ _SERVER ['REQUEST_METHOD ' ] = 'GET ' ;
12+
13+ // Default SERVER_PROTOCOL method to HTTP/1.1
14+ $ _SERVER ['SERVER_PROTOCOL ' ] = 'HTTP/1.1 ' ;
15+ }
16+
17+ protected function tearDown ()
18+ {
19+ // nothing
20+ }
21+
22+ public function testInit ()
23+ {
24+ $ this ->assertInstanceOf ('\Buki\Router ' , new \Buki \Router ());
25+ }
26+ }
Original file line number Diff line number Diff line change 1+ <?php
2+ require 'vendor/autoload.php ' ;
You can’t perform that action at this time.
0 commit comments