|
1 | 1 | <?php |
2 | | -class CodepenTest extends PHPUnit_Framework_TestCase |
| 2 | +class CodepenTest extends TestCaseBase |
3 | 3 | { |
4 | 4 | public function testAnonymous() |
5 | 5 | { |
6 | 6 | $info = Embed\Embed::create('http://codepen.io/anon/pen/QwPVNW'); |
7 | 7 |
|
8 | | - $this->assertEquals($info->imageWidth, 400); |
9 | | - $this->assertEquals($info->imageHeight, 225); |
10 | | - $this->assertEquals($info->code, '<iframe id="cp_embed_QwPVNW" src="https://codepen.io/anon/embed/QwPVNW?height=300&slug-hash=QwPVNW&default-tab=result&host=http%3A%2F%2Fcodepen.io" scrolling="no" frameborder="0" height="300" allowtransparency="true" class="cp_embed_iframe" style="width: 100%; overflow: hidden;"></iframe>'); |
11 | | - $this->assertEquals($info->type, 'rich'); |
| 8 | + $this->assertString($info->imageWidth, 400); |
| 9 | + $this->assertString($info->imageHeight, 225); |
| 10 | + $this->assertString($info->code, '<iframe id="cp_embed_QwPVNW" src="https://codepen.io/anon/embed/QwPVNW?height=300&slug-hash=QwPVNW&default-tab=result&host=http%3A%2F%2Fcodepen.io" scrolling="no" frameborder="0" height="300" allowtransparency="true" class="cp_embed_iframe" style="width: 100%; overflow: hidden;"></iframe>'); |
| 11 | + $this->assertString($info->type, 'rich'); |
12 | 12 | } |
13 | 13 |
|
14 | 14 | public function testNormal() |
15 | 15 | { |
16 | 16 | $info = Embed\Embed::create('http://codepen.io/Zhouzi/pen/JoRazP'); |
17 | 17 |
|
18 | | - $this->assertEquals($info->title, 'TheaterJS'); |
19 | | - $this->assertEquals($info->imageWidth, 384); |
20 | | - $this->assertEquals($info->imageHeight, 225); |
21 | | - $this->assertEquals($info->code, '<iframe id="cp_embed_JoRazP" src="https://codepen.io/Zhouzi/embed/JoRazP?height=300&slug-hash=JoRazP&default-tab=result&host=http%3A%2F%2Fcodepen.io" scrolling="no" frameborder="0" height="300" allowtransparency="true" class="cp_embed_iframe" style="width: 100%; overflow: hidden;"></iframe>'); |
22 | | - $this->assertEquals($info->type, 'rich'); |
| 18 | + $this->assertString($info->title, 'TheaterJS'); |
| 19 | + $this->assertString($info->imageWidth, 384); |
| 20 | + $this->assertString($info->imageHeight, 225); |
| 21 | + $this->assertString($info->code, '<iframe id="cp_embed_JoRazP" src="https://codepen.io/Zhouzi/embed/JoRazP?height=300&slug-hash=JoRazP&default-tab=result&host=http%3A%2F%2Fcodepen.io" scrolling="no" frameborder="0" height="300" allowtransparency="true" class="cp_embed_iframe" style="width: 100%; overflow: hidden;"></iframe>'); |
| 22 | + $this->assertString($info->type, 'rich'); |
23 | 23 | } |
24 | 24 | } |
0 commit comments