Skip to content

Commit d53edd0

Browse files
committed
tests improvements
1 parent df4cddc commit d53edd0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+84
-69
lines changed

src/Adapters/Google.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function getCode()
3030
$url = $this->request->createUrl()
3131
->withDirectoryPosition(3, 'preview')
3232
->withQueryParameters([]);
33-
33+
3434
return Utils::iframe($url);
3535

3636
//this code of google maps no longer works

src/Embed.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ class Embed
1111
* @param string|Request $request The url or a request with the url
1212
* @param array $config Options passed to the adapter
1313
*
14-
* @return false|AdapterInterface
14+
* @throws Exceptions\InvalidUrlException If the urls is not valid
15+
* @throws \InvalidArgumentException If any config argument is not valid
16+
*
17+
* @return AdapterInterface
1518
*/
1619
public static function create($request, array $config = array())
1720
{

tests/AnimotoTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class AnimotoTest extends TestCaseBase
33
{
44
public function testOne()
55
{
6-
$info = Embed\Embed::create('https://animoto.com/play/JzwsBn5FRVxS0qoqcBP5zA');
6+
$info = $this->getInfo('https://animoto.com/play/JzwsBn5FRVxS0qoqcBP5zA');
77

88
$this->assertString($info->title, 'Juno Groove');
99
$this->assertString($info->width, 640);

tests/AolTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class AolTest extends TestCaseBase
33
{
44
public function testOne()
55
{
6-
$info = Embed\Embed::create('http://on.aol.com/video/whats-next-for-google-in-two-minutes-518288612');
6+
$info = $this->getInfo('http://on.aol.com/video/whats-next-for-google-in-two-minutes-518288612');
77

88
$this->assertString($info->title, "What's Next for Google in Two Minutes");
99
$this->assertString($info->description, "Wherein we smoosh Google's 2014 developer conference keynote from 2.5+ hours down to just under two minutes.");

tests/AppTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class AppTest extends TestCaseBase
33
{
44
public function testOne()
55
{
6-
$info = Embed\Embed::create('https://alpha.app.net/chrifpa/post/33532003/photo/1');
6+
$info = $this->getInfo('https://alpha.app.net/chrifpa/post/33532003/photo/1');
77

88
$this->assertString($info->title, "Image_from_Riposte_2014-06-28.jpg");
99
$this->assertString($info->description, 'is what I see in my mind when I hear “there’s now a $foo in javascript”. This [photos.app.net]');

tests/ArchiveTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class ArchiveTest extends TestCaseBase
33
{
44
public function testOne()
55
{
6-
$info = Embed\Embed::create('https://archive.org/details/dn2015-0220_vid');
6+
$info = $this->getInfo('https://archive.org/details/dn2015-0220_vid');
77

88
$this->assertString($info->width, 640);
99
$this->assertString($info->height, 480);

tests/BambuserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class BambuserTest extends TestCaseBase
33
{
44
public function testOne()
55
{
6-
$info = Embed\Embed::create('http://bambuser.com/v/4740575');
6+
$info = $this->getInfo('http://bambuser.com/v/4740575');
77

88
$this->assertString($info->title, "#OccupyWestminster #SaveILF #London #olsx #ONN");
99
$this->assertString($info->description, 'Broadcast by dancole on Bambuser.com');

tests/BandcampTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class BandcampTest extends TestCaseBase
33
{
44
public function testOne()
55
{
6-
$info = Embed\Embed::create('http://jeanjean.bandcamp.com/track/coquin-l-l-phant');
6+
$info = $this->getInfo('http://jeanjean.bandcamp.com/track/coquin-l-l-phant');
77

88
$this->assertString($info->title, "Coquin L'éléphant, by Jean Jean");
99
$this->assertString($info->description, 'from the album Symmetry');

tests/BlipTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class BlipTest extends TestCaseBase
33
{
44
public function testOne()
55
{
6-
$info = Embed\Embed::create('http://blip.tv/indevelopment/iamsorry-6839170');
6+
$info = $this->getInfo('http://blip.tv/indevelopment/iamsorry-6839170');
77

88
$this->assertString($info->title, '#IAMSORRY');
99
$this->assertString($info->imageWidth, 720);

tests/ChirbitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class ChirbitTest extends TestCaseBase
33
{
44
public function testOne()
55
{
6-
$info = Embed\Embed::create('http://chirb.it/7A9L9B');
6+
$info = $this->getInfo('http://chirb.it/7A9L9B');
77

88
$this->assertString($info->title, 'Chirbit [nvanderklippe] Encana conference call');
99
$this->assertString($info->width, 398);

0 commit comments

Comments
 (0)