X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2FoEmbedTest.php;h=1f1d5f826cba25f4899f7a6605d5596d96d9712b;hb=64df40e409812249748723b8acb0b48920ed786b;hp=b5e441c42fc02dc0c770c6f066e5276d5d7a33bb;hpb=d8d9edfc990a20f67421e40a7d3055a58697a002;p=quix0rs-gnu-social.git diff --git a/tests/oEmbedTest.php b/tests/oEmbedTest.php index b5e441c42f..1f1d5f826c 100644 --- a/tests/oEmbedTest.php +++ b/tests/oEmbedTest.php @@ -15,22 +15,22 @@ class oEmbedTest extends PHPUnit_Framework_TestCase public function setup() { - $this->old_oohembed = common_config('oohembed', 'endpoint'); + $this->old_ohembed = common_config('ohembed', 'endpoint'); } public function tearDown() { - $GLOBALS['config']['oohembed']['endpoint'] = $this->old_oohembed; + $GLOBALS['config']['oembed']['endpoint'] = $this->old_ohembed; } /** - * Test with oohembed DISABLED. + * Test with ohembed DISABLED. * * @dataProvider discoverableSources */ public function testoEmbed($url, $expectedType) { - $GLOBALS['config']['oohembed']['endpoint'] = false; + $GLOBALS['config']['oembed']['endpoint'] = false; $this->_doTest($url, $expectedType); } @@ -39,14 +39,14 @@ class oEmbedTest extends PHPUnit_Framework_TestCase * * @dataProvider fallbackSources */ - public function testoohEmbed($url, $expectedType) + public function testnoEmbed($url, $expectedType) { - $GLOBALS['config']['oohembed']['endpoint'] = $this->_endpoint(); + $GLOBALS['config']['oembed']['endpoint'] = $this->_endpoint(); $this->_doTest($url, $expectedType); } /** - * Get default oohembed endpoint. + * Get default oembed endpoint. * * @return string */ @@ -55,7 +55,7 @@ class oEmbedTest extends PHPUnit_Framework_TestCase $default = array(); $_server = 'localhost'; $_path = ''; require INSTALLDIR . '/lib/default.php'; - return $default['oohembed']['endpoint']; + return $default['oembed']['endpoint']; } /** @@ -113,7 +113,6 @@ class oEmbedTest extends PHPUnit_Framework_TestCase static public function discoverableSources() { $sources = array( - array('http://identi.ca/attachment/34437400', 'photo'), array('http://www.youtube.com/watch?v=eUgLR232Cnw', 'video'), array('http://vimeo.com/9283184', 'video'), @@ -125,16 +124,20 @@ class oEmbedTest extends PHPUnit_Framework_TestCase } /** - * Sample oEmbed targets that can be found via oohembed.com. + * Sample oEmbed targets that can be found via noembed.com. * Includes also discoverableSources() output. * * @return array */ static public function fallbackSources() { + $sources = array( - array('http://en.wikipedia.org/wiki/File:Wiki.png', 'link'), // @fixme in future there may be a native provider -- will change to 'photo' + array('https://github.com/git/git/commit/85e9c7e1d42849c5c3084a9da748608468310c0e', 'Github Commit'), // @fixme in future there may be a native provider -- will change to 'photo' ); + + $sources = array(); + return array_merge(self::discoverableSources(), $sources); } }