[Embed] Using oscarotero/Embed as first attempt to get oEmbed/OpenGraph data, fallback

to previous implementation otherwise.
This commit is contained in:
Miguel Dantas
2019-07-07 13:26:10 +01:00
committed by Diogo Cordeiro
parent b25632ebc4
commit 462ea26303
5 changed files with 61 additions and 41 deletions

View File

@@ -92,7 +92,7 @@ class oEmbedTest extends PHPUnit_Framework_TestCase
public function _doTest($url, $expectedType)
{
try {
$data = oEmbedHelper::getObject($url);
$data = EmbedHelper::getObject($url);
$this->assertEquals($expectedType, $data->type);
if ($data->type == 'photo') {
$this->assertTrue(!empty($data->url), 'Photo must have a URL.');