| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 15 | public function test_transform() |
||
| 16 | { |
||
| 17 | $request = new Request( |
||
| 18 | [], |
||
| 19 | [], |
||
| 20 | [], |
||
| 21 | [], |
||
| 22 | [], |
||
| 23 | [ |
||
| 24 | 'SERVER_NAME' => 'current.domain.com' |
||
| 25 | ] |
||
| 26 | ); |
||
| 27 | $section = new Section(['subdomain' => 'new']); |
||
| 28 | |||
| 29 | $url = 'https://current.domain.com/index?redirect=https://current.domain.com'; |
||
| 30 | $transformer = UrlTransformer::from($request); |
||
| 31 | |||
| 32 | self::assertSame( |
||
| 33 | 'https://new.domain.com/index?redirect=https://current.domain.com', |
||
| 34 | $transformer->transform($url, $section) |
||
| 35 | ); |
||
| 38 |