Skip to content

Commit a1b8d64

Browse files
committed
improved tests
1 parent c0aee70 commit a1b8d64

35 files changed

+39
-66
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ before_install:
1111
- composer self-update
1212

1313
script:
14-
- phpunit tests
14+
- phpunit

phpunit.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<phpunit bootstrap="./tests/bootstrap.php">
2+
<testsuites>
3+
<testsuite name="All tests">
4+
<directory>./tests/</directory>
5+
</testsuite>
6+
</testsuites>
7+
</phpunit>

tests/BlipTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class BlipTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/DailyMotionTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class DailyMotionTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/DevianArtTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class DevianArtTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/FileTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class FileTest extends PHPUnit_Framework_TestCase
53
{
64
public function testJpg()

tests/GiphyTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class GiphyTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/GithubTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class GithubTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/GoogleTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class GoogleTest extends PHPUnit_Framework_TestCase
53
{
64
public function testMap()

tests/ImageInfoTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class ImageInfoTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/ImgurTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class ImgurTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/InstagramTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class InstagramTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/JsfiddleTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class JsfiddleTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/KewegoTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class KewegoTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/LineTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class LineTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/MeetUpTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class MeetUpTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/MitTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class MitTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/ParleysTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class ParleysTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/PastebinTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class PastebinTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/PhotoBucketTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class PhotoBucketTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/PoliticoTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class PoliticoTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/RdioTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class RdioTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/RedirectionsTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class RedirectionsTest extends PHPUnit_Framework_TestCase
53
{
64
public function testGoogleTranslate()

tests/Revision3Test.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class Revision3Test extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/ScribdTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class ScribdTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/SlidesTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class SlidesTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/SoundcloudTest.php

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class SoundcloudTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()
75
{
86
$info = Embed\Embed::create('https://soundcloud.com/zedsdead/zeds-dead-twin-shadow-lost-you-feat-dangelo-lacy');
97

10-
$this->assertEquals($info->title, "Zeds Dead - Lost You (feat. Twin Shadow & D'Angelo Lacy)");
8+
$this->assertEquals($info->title, "Zeds Dead - Lost You (feat. Twin Shadow & D'Angelo Lacy) by Zeds Dead");
119
$this->assertEquals($info->type, 'rich');
1210
$this->assertEquals($info->code, '<iframe width="100%" height="400" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?visual=true&url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F150745932&show_artwork=true"></iframe>');
1311
$this->assertEquals($info->authorName, 'Zeds Dead');
@@ -16,6 +14,30 @@ public function testOne()
1614
$this->assertEquals($info->providerUrl, 'https://soundcloud.com');
1715
}
1816

17+
public function testTwo()
18+
{
19+
$info = Embed\Embed::create('https://soundcloud.com/bruceneilmusic');
20+
21+
$this->assertEquals($info->title, "Bruce Neil");
22+
$this->assertEquals($info->description, "Bruce Neil from Wokingham is a self-taught singer/songwriter with a folk and blues sound, producing songs that tell stories about people. Recently having success winning a BBC Introducing competition and achieving air play nationally. He takes his musical inspiration and guitar-playing style from the likes of Passenger Mick Flannery and Tommy Emmanuel.");
23+
$this->assertEquals($info->type, 'rich');
24+
$this->assertEquals($info->code, '<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?visual=true&url=http%3A%2F%2Fapi.soundcloud.com%2Fusers%2F6538603&show_artwork=true"></iframe>');
25+
$this->assertEquals($info->providerName, 'SoundCloud');
26+
$this->assertEquals($info->providerUrl, 'https://soundcloud.com');
27+
}
28+
29+
public function testThree()
30+
{
31+
$info = Embed\Embed::create('https://soundcloud.com/calumfoad/sets/flaws-ep-stream');
32+
33+
$this->assertEquals($info->title, "Flaws EP by Calum Foad");
34+
$this->assertEquals($info->description, "19 year old singer/songwriter from Reading.");
35+
$this->assertEquals($info->type, 'rich');
36+
$this->assertEquals($info->code, '<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?visual=true&url=http%3A%2F%2Fapi.soundcloud.com%2Fplaylists%2F46025307&show_artwork=true"></iframe>');
37+
$this->assertEquals($info->providerName, 'SoundCloud');
38+
$this->assertEquals($info->providerUrl, 'https://soundcloud.com');
39+
}
40+
1941
public function testMobile()
2042
{
2143
$info = Embed\Embed::create('https://m.soundcloud.com/zedsdead/zeds-dead-twin-shadow-lost-you-feat-dangelo-lacy');

tests/SpotifyTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class SpotifyTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/SpreakerTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class SpreakerTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/TedTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class TedTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/TwitterTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class TwitterTest extends PHPUnit_Framework_TestCase
53
{
64
public function _testNormal()

tests/UrlTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class UrlTest extends PHPUnit_Framework_TestCase
53
{
64
public function testParser()

tests/YFrogTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class YFrogTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/YoutubeTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?php
2-
include_once dirname(__DIR__).'/src/autoloader.php';
3-
42
class YoutubeTest extends PHPUnit_Framework_TestCase
53
{
64
public function testOne()

tests/bootstrap.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
error_reporting(E_ALL);
3+
4+
include_once dirname(__DIR__).'/src/autoloader.php';
5+
6+
PHPUnit_Framework_Error_Notice::$enabled = true;

0 commit comments

Comments
 (0)