|
@@ 87-95 (lines=9) @@
|
| 84 |
|
]; |
| 85 |
|
} |
| 86 |
|
|
| 87 |
|
public function testSetGetRequestMapHost() |
| 88 |
|
{ |
| 89 |
|
$mapKey = 'phoenix-rises.fm'; |
| 90 |
|
$request = new SimplifiedRequest(['host' => $mapKey]); |
| 91 |
|
$matcher = new Host(['foo' => $mapKey]); |
| 92 |
|
$matcher->setRequest($request); |
| 93 |
|
$this->assertSame($request, $matcher->getRequest()); |
| 94 |
|
$this->assertSame($mapKey, $matcher->getMapKey()); |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
public function testReverseHostMatchFail() |
| 98 |
|
{ |
|
@@ 123-131 (lines=9) @@
|
| 120 |
|
$this->assertSame('phoenix-rises.fm', $result->getRequest()->host); |
| 121 |
|
} |
| 122 |
|
|
| 123 |
|
public function testSetGetRequestMapPort() |
| 124 |
|
{ |
| 125 |
|
$mapKey = '8000'; |
| 126 |
|
$request = new SimplifiedRequest(['port' => $mapKey]); |
| 127 |
|
$matcher = new Port(['foo' => $mapKey]); |
| 128 |
|
$matcher->setRequest($request); |
| 129 |
|
$this->assertSame($request, $matcher->getRequest()); |
| 130 |
|
$this->assertSame($mapKey, $matcher->getMapKey()); |
| 131 |
|
} |
| 132 |
|
|
| 133 |
|
public function testReversePortMatchFail() |
| 134 |
|
{ |