File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ namespace Embed \Providers \OEmbed ;
3+
4+ class Ustream extends OEmbedImplementation
5+ {
6+ /**
7+ * {@inheritdoc}
8+ */
9+ public static function getEndPoint ()
10+ {
11+ return 'http://www.ustream.tv/oembed ' ;
12+ }
13+
14+ /**
15+ * {@inheritdoc}
16+ */
17+ public static function getPatterns ()
18+ {
19+ return ['https?://www.ustream.tv/* ' ];
20+ }
21+ }
Original file line number Diff line number Diff line change 1+ <?php
2+ class UstreamTest extends PHPUnit_Framework_TestCase
3+ {
4+ public function testOne ()
5+ {
6+ $ info = Embed \Embed::create ('http://www.ustream.tv/channel/red-shoes-billiards-60803-camera-1 ' );
7+
8+ $ this ->assertEquals ($ info ->title , 'Red Shoes Billiards 1pkt,banks camera 1 ' );
9+ $ this ->assertEquals ($ info ->imageWidth , 120 );
10+ $ this ->assertEquals ($ info ->imageHeight , 90 );
11+ $ this ->assertEquals ($ info ->type , 'video ' );
12+ $ this ->assertEquals ($ info ->authorName , 'redsh0es ' );
13+ $ this ->assertEquals ($ info ->authorUrl , 'http://www.ustream.tv/user/redsh0es ' );
14+ $ this ->assertEquals ($ info ->providerName , 'Ustream ' );
15+ $ this ->assertEquals ($ info ->providerUrl , 'http://www.ustream.tv/ ' );
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments