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