| Total Complexity | 4 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class ConfigTest extends TestCase |
||
| 22 | { |
||
| 23 | public function testBasePath(): void |
||
| 24 | { |
||
| 25 | $c = new HttpConfig([ |
||
| 26 | 'basePath' => '/' |
||
| 27 | ]); |
||
| 28 | |||
| 29 | $this->assertSame('/', $c->getBasePath()); |
||
| 30 | } |
||
| 31 | |||
| 32 | public function testBaseHeaders(): void |
||
| 33 | { |
||
| 34 | $c = new HttpConfig([ |
||
| 35 | 'headers' => [ |
||
| 36 | 'key' => 'value' |
||
| 37 | ] |
||
| 38 | ]); |
||
| 39 | |||
| 40 | $this->assertSame(['key' => 'value'], $c->getBaseHeaders()); |
||
| 41 | } |
||
| 42 | |||
| 43 | public function testBaseMiddleware(): void |
||
| 44 | { |
||
| 45 | $c = new HttpConfig([ |
||
| 46 | 'middleware' => [TestMiddleware::class] |
||
| 47 | ]); |
||
| 48 | |||
| 49 | $this->assertSame([TestMiddleware::class], $c->getMiddleware()); |
||
| 50 | } |
||
| 51 | |||
| 52 | public function testBaseMiddlewareFallback(): void |
||
| 59 | } |
||
| 60 | } |
||
| 61 |