Total Complexity | 2 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class OpenGraphTest extends TestCase |
||
9 | { |
||
10 | /** @test */ |
||
11 | public function testFetch() |
||
12 | { |
||
13 | $opengraph = new OpenGraph(); |
||
14 | $data = $opengraph->fetch( |
||
15 | 'https://www.unsplash.com/' |
||
16 | ); |
||
17 | $this->assertArrayHasKey('title', $data); |
||
18 | $this->assertArrayHasKey('description', $data); |
||
19 | $this->assertArrayHasKey('type', $data); |
||
20 | $this->assertArrayHasKey('url', $data); |
||
21 | $this->assertArrayHasKey('image', $data); |
||
22 | } |
||
23 | |||
24 | /** @test */ |
||
25 | public function testFetchReturnsEmptyArrayForWebsiteWithNoMetadata() |
||
33 | } |
||
34 | } |
||
35 |