summaryrefslogtreecommitdiffstats
path: root/tests/unit/articleenhancer/GlobalArticleEnhancerTest.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-10-21 16:45:36 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-10-21 16:45:36 +0200
commit42d69a95f3276a2d6089ca68f635c4e2f6aa7a23 (patch)
tree6a17fd7998f291e6dec1d996c1e7c724b92b8e58 /tests/unit/articleenhancer/GlobalArticleEnhancerTest.php
parent0e6598b0734fb927109f745d9c0f3a8605a30ca5 (diff)
convert tabs indention to indention with 4 spaces because of mixing of both variants in code and better readability on github and websites because you cant set the indention width there and 8 spaces will be used for a tab
Diffstat (limited to 'tests/unit/articleenhancer/GlobalArticleEnhancerTest.php')
-rw-r--r--tests/unit/articleenhancer/GlobalArticleEnhancerTest.php72
1 files changed, 36 insertions, 36 deletions
diff --git a/tests/unit/articleenhancer/GlobalArticleEnhancerTest.php b/tests/unit/articleenhancer/GlobalArticleEnhancerTest.php
index 84c55ad9d..3add03eb5 100644
--- a/tests/unit/articleenhancer/GlobalArticleEnhancerTest.php
+++ b/tests/unit/articleenhancer/GlobalArticleEnhancerTest.php
@@ -18,54 +18,54 @@ use \OCA\News\Db\Item;
class GlobalArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
- private $enhancer;
+ private $enhancer;
- protected function setUp() {
- $this->enhancer = new GlobalArticleEnhancer();
- }
+ protected function setUp() {
+ $this->enhancer = new GlobalArticleEnhancer();
+ }
- public function testNoReplaceYoutubeAutoplay() {
- $body = '<iframe width="728" height="410" src="//www.youtube.com/embed/autoplay=1/AWE6UpXQoGU" frameborder="0" allowfullscreen=""></iframe>';
- $expected = '<div><iframe width="728" height="410" src="//www.youtube.com/embed/autoplay=1/AWE6UpXQoGU" frameborder="0" allowfullscreen=""></iframe></div>';
- $item = new Item();
- $item->setBody($body);
+ public function testNoReplaceYoutubeAutoplay() {
+ $body = '<iframe width="728" height="410" src="//www.youtube.com/embed/autoplay=1/AWE6UpXQoGU" frameborder="0" allowfullscreen=""></iframe>';
+ $expected = '<div><iframe width="728" height="410" src="//www.youtube.com/embed/autoplay=1/AWE6UpXQoGU" frameborder="0" allowfullscreen=""></iframe></div>';
+ $item = new Item();
+ $item->setBody($body);
- $result = $this->enhancer->enhance($item);
- $this->assertEquals($expected, $result->getBody());
- }
+ $result = $this->enhancer->enhance($item);
+ $this->assertEquals($expected, $result->getBody());
+ }
- public function testReplaceYoutubeAutoplay() {
- $body = 'test <iframe width="728" height="410" src="//www.youtube.com/embed/AWE6UpXQoGU?tst=1&autoplay=1&abc=1" frameborder="0" allowfullscreen=""></iframe>';
- $expected = '<div>test <iframe width="728" height="410" src="//www.youtube.com/embed/AWE6UpXQoGU?tst=1&amp;autoplay=0&amp;abc=1" frameborder="0" allowfullscreen=""></iframe></div>';
- $item = new Item();
- $item->setBody($body);
+ public function testReplaceYoutubeAutoplay() {
+ $body = 'test <iframe width="728" height="410" src="//www.youtube.com/embed/AWE6UpXQoGU?tst=1&autoplay=1&abc=1" frameborder="0" allowfullscreen=""></iframe>';
+ $expected = '<div>test <iframe width="728" height="410" src="//www.youtube.com/embed/AWE6UpXQoGU?tst=1&amp;autoplay=0&amp;abc=1" frameborder="0" allowfullscreen=""></iframe></div>';
+ $item = new Item();
+ $item->setBody($body);
- $result = $this->enhancer->enhance($item);
- $this->assertEquals($expected, $result->getBody());
- }
+ $result = $this->enhancer->enhance($item);
+ $this->assertEquals($expected, $result->getBody());
+ }
- public function testMultipleParagraphs() {
- $body = '<p>paragraph 1</p><p>paragraph 2</p>';
- $expected = '<div>' . $body . '</div>';
- $item = new Item();
- $item->setBody($body);
+ public function testMultipleParagraphs() {
+ $body = '<p>paragraph 1</p><p>paragraph 2</p>';
+ $expected = '<div>' . $body . '</div>';
+ $item = new Item();
+ $item->setBody($body);
- $result = $this->enhancer->enhance($item);
- $this->assertEquals($expected, $result->getBody());
- }
+ $result = $this->enhancer->enhance($item);
+ $this->assertEquals($expected, $result->getBody());
+ }
- public function testMultipleParagraphsInDiv() {
- $body = '<p>paragraph 1</p><p>paragraph 2</p>';
- $expected = '<div>' . $body . '</div>';
- $item = new Item();
- $item->setBody($body);
+ public function testMultipleParagraphsInDiv() {
+ $body = '<p>paragraph 1</p><p>paragraph 2</p>';
+ $expected = '<div>' . $body . '</div>';
+ $item = new Item();
+ $item->setBody($body);
- $result = $this->enhancer->enhance($item);
- $this->assertEquals($expected, $result->getBody());
- }
+ $result = $this->enhancer->enhance($item);
+ $this->assertEquals($expected, $result->getBody());
+ }
}