Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class HyperlinksTest extends TestCase |
||
13 | { |
||
14 | protected Hyperlinks $class; |
||
15 | |||
16 | protected function setUp(): void |
||
21 | } |
||
22 | |||
23 | public function test_image_helper_gets_relative_web_link_to_image_stored_in_site_media_folder() |
||
24 | { |
||
25 | $tests = [ |
||
26 | 'test.jpg' => 'media/test.jpg', |
||
27 | 'foo' => 'media/foo', |
||
28 | 'http://example.com/test.jpg' => 'http://example.com/test.jpg', |
||
29 | 'https://example.com/test.jpg' => 'https://example.com/test.jpg', |
||
30 | ]; |
||
31 | |||
32 | foreach ($tests as $input => $expected) { |
||
33 | $this->assertEquals($this->class->image($input), $expected); |
||
34 | } |
||
35 | } |
||
36 | |||
37 | public function test_image_helper_resolves_paths_for_nested_pages() |
||
49 | } |
||
50 | } |
||
52 |