@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function register() |
| 25 | 25 | { |
| 26 | - $this->app->bind('OpenGraph', function () { |
|
| 26 | + $this->app->bind('OpenGraph', function() { |
|
| 27 | 27 | return new \shweshi\OpenGraph\OpenGraph(); |
| 28 | 28 | }); |
| 29 | 29 | } |
@@ -9,26 +9,26 @@ |
||
| 9 | 9 | { |
| 10 | 10 | /** @test */ |
| 11 | 11 | public function testFetch() |
| 12 | - { |
|
| 12 | + { |
|
| 13 | 13 | $o = new OpenGraph(); |
| 14 | - $data = $o->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 | - } |
|
| 14 | + $data = $o->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 | 23 | |
| 24 | - /** @test */ |
|
| 25 | - public function testFetchReturnsEmptyArrayForWebsiteWithNoMetadata() |
|
| 26 | - { |
|
| 27 | - $o = new OpenGraph(); |
|
| 28 | - $data = $o->fetch( |
|
| 24 | + /** @test */ |
|
| 25 | + public function testFetchReturnsEmptyArrayForWebsiteWithNoMetadata() |
|
| 26 | + { |
|
| 27 | + $o = new OpenGraph(); |
|
| 28 | + $data = $o->fetch( |
|
| 29 | 29 | 'https://www.example.com/' |
| 30 | - ); |
|
| 30 | + ); |
|
| 31 | 31 | |
| 32 | - $this->assertEmpty($data); |
|
| 33 | - } |
|
| 32 | + $this->assertEmpty($data); |
|
| 33 | + } |
|
| 34 | 34 | } |