tests/Vectorface/SnappyRouterTests/Handler/DirectScriptHandlerTest.php 1 location
|
@@ 48-58 (lines=11) @@
|
45 |
|
/** |
46 |
|
* Tests that the getRequest() method returns null. |
47 |
|
*/ |
48 |
|
public function testGetRequest() |
49 |
|
{ |
50 |
|
$config = array( |
51 |
|
DirectScriptHandler::KEY_PATH_MAP => array( |
52 |
|
'/cgi-bin' => __DIR__ |
53 |
|
) |
54 |
|
); |
55 |
|
$handler = new DirectScriptHandler($config); |
56 |
|
$this->assertTrue($handler->isAppropriate('/cgi-bin/test_script.php', array(), array(), 'GET')); |
57 |
|
$this->assertNull($handler->getRequest()); |
58 |
|
} |
59 |
|
} |
60 |
|
|
tests/Vectorface/SnappyRouterTests/Handler/PatternMatchHandlerTest.php 1 location
|
@@ 79-91 (lines=13) @@
|
76 |
|
/** |
77 |
|
* Tests that the getRequest() method returns null. |
78 |
|
*/ |
79 |
|
public function testGetRequest() |
80 |
|
{ |
81 |
|
$config = array( |
82 |
|
'routes' => array( |
83 |
|
'/testRoute' => function () { |
84 |
|
return false; |
85 |
|
} |
86 |
|
) |
87 |
|
); |
88 |
|
$handler = new PatternMatchHandler($config); |
89 |
|
$this->assertTrue($handler->isAppropriate('/testRoute', array(), array(), 'GET')); |
90 |
|
$this->assertNull($handler->getRequest()); |
91 |
|
} |
92 |
|
} |
93 |
|
|