@@ -25,4 +25,14 @@ class OGPResolverTest extends TestCase
|
||||
$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);
|
||||
}
|
||||
|
||||
public function testResolveTitleOnly()
|
||||
{
|
||||
$resolver = new OGPResolver();
|
||||
|
||||
$metadata = $resolver->resolve('http://example.com');
|
||||
$this->assertEquals('Example Domain', $metadata->title);
|
||||
$this->assertEmpty($metadata->description);
|
||||
$this->assertEmpty($metadata->image);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user