@@ -11,7 +11,7 @@ |
||
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | if (!empty($caption)) { |
| 14 | - $arguments['Caption'] = $caption; |
|
| 14 | + $arguments['Caption'] = $caption; |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | $customise = array(); |
@@ -2,30 +2,30 @@ |
||
| 2 | 2 | |
| 3 | 3 | class GistShortCodeHandlerTest extends SapphireTest { |
| 4 | 4 | |
| 5 | - protected static $fixture_file = 'GistShortCodeHandlerTest.yml'; |
|
| 5 | + protected static $fixture_file = 'GistShortCodeHandlerTest.yml'; |
|
| 6 | 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: |
|
| 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 | 11 | <a href="https://gist.github.com/gordonbanderson/7fadc8280da9e2694960">Gist</a></noscript> |
| 12 | 12 | '; |
| 13 | - $this->assertEquals($expected, $html); |
|
| 14 | - } |
|
| 13 | + $this->assertEquals($expected, $html); |
|
| 14 | + } |
|
| 15 | 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: |
|
| 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 | 20 | <a href="https://gist.github.com/gordonbanderson/7fadc8280da9e2694960">Gist</a></noscript><p class="caption">This is a caption</p> |
| 21 | 21 | '; |
| 22 | - $this->assertEquals($expected, $html); |
|
| 23 | - } |
|
| 22 | + $this->assertEquals($expected, $html); |
|
| 23 | + } |
|
| 24 | 24 | |
| 25 | - public function testGistWithMissingID() { |
|
| 26 | - $page = $this->objFromFixture('Page', 'GistWithMissingID'); |
|
| 27 | - $html = ShortcodeParser::get_active()->parse($page->Content); |
|
| 28 | - $this->assertEquals('This will be blank ', $html); |
|
| 29 | - } |
|
| 25 | + public function testGistWithMissingID() { |
|
| 26 | + $page = $this->objFromFixture('Page', 'GistWithMissingID'); |
|
| 27 | + $html = ShortcodeParser::get_active()->parse($page->Content); |
|
| 28 | + $this->assertEquals('This will be blank ', $html); |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | 31 | } |