expectException(ClientException::class); $resolver->resolve('http://example.com/404'); } public function testResolve() { $resolver = new OGPResolver(); $metadata = $resolver->resolve('http://ogp.me'); $this->assertEquals('Open Graph protocol', $metadata->title); $this->assertEquals('The Open Graph protocol enables any web page to become a rich object in a social graph.', $metadata->description); $this->assertEquals('http://ogp.me/logo.png', $metadata->image); } }