|
@@ 7-14 (lines=8) @@
|
| 4 |
|
|
| 5 |
|
protected static $fixture_file = 'GistShortCodeHandlerTest.yml'; |
| 6 |
|
|
| 7 |
|
public function testGistIdOnly() { |
| 8 |
|
$page = $this->objFromFixture('Page', 'GistIdOnly'); |
| 9 |
|
$html = ShortcodeParser::get_active()->parse($page->Content); |
| 10 |
|
$expected = 'There should be a gist here <script src="https://gist.github.com/gordonbanderson/7fadc8280da9e2694960.js"></script><noscript>Please enable javascript to see this Gist inline. It can be viewed externally here: |
| 11 |
|
<a href="https://gist.github.com/gordonbanderson/7fadc8280da9e2694960">Gist</a></noscript> |
| 12 |
|
'; |
| 13 |
|
$this->assertEquals($expected, $html); |
| 14 |
|
} |
| 15 |
|
|
| 16 |
|
public function testGistWithCaption() { |
| 17 |
|
$page = $this->objFromFixture('Page', 'GistWithCaption'); |
|
@@ 16-23 (lines=8) @@
|
| 13 |
|
$this->assertEquals($expected, $html); |
| 14 |
|
} |
| 15 |
|
|
| 16 |
|
public function testGistWithCaption() { |
| 17 |
|
$page = $this->objFromFixture('Page', 'GistWithCaption'); |
| 18 |
|
$html = ShortcodeParser::get_active()->parse($page->Content); |
| 19 |
|
$expected = 'There should be a gist here with a caption <script src="https://gist.github.com/gordonbanderson/7fadc8280da9e2694960.js"></script><noscript>Please enable javascript to see this Gist inline. It can be viewed externally here: |
| 20 |
|
<a href="https://gist.github.com/gordonbanderson/7fadc8280da9e2694960">Gist</a></noscript><p class="caption">This is a caption</p> |
| 21 |
|
'; |
| 22 |
|
$this->assertEquals($expected, $html); |
| 23 |
|
} |
| 24 |
|
|
| 25 |
|
public function testGistWithMissingID() { |
| 26 |
|
$page = $this->objFromFixture('Page', 'GistWithMissingID'); |