From 772999e5628e62286c95f7e11635585404660a88 Mon Sep 17 00:00:00 2001 From: bastei Date: Thu, 5 Sep 2013 02:51:20 +0200 Subject: ArticleEnhancer unit test modified for multiple XPath-results --- tests/unit/utility/articleenhancer/ArticleEnhancerTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/unit/utility/articleenhancer/ArticleEnhancerTest.php b/tests/unit/utility/articleenhancer/ArticleEnhancerTest.php index 5f82a4752..a59bf9485 100644 --- a/tests/unit/utility/articleenhancer/ArticleEnhancerTest.php +++ b/tests/unit/utility/articleenhancer/ArticleEnhancerTest.php @@ -58,7 +58,7 @@ class ArticleEnhancerTest extends \OCA\AppFramework\Utility\TestUtility { $this->fileFactory, array( '/explosm.net\/comics/' => '//*[@id=\'maincontent\']/div[2]/div/img', - '/explosm.net\/shorts/' => '//*[@id=\'maincontent\']/div[2]/div' + '/explosm.net\/shorts/' => '//*[@id=\'maincontent\']/div/div' ), $this->timeout ); @@ -106,7 +106,7 @@ class ArticleEnhancerTest extends \OCA\AppFramework\Utility\TestUtility { $file->body = '
-
nooo
+
nooo
hiho
rawr
@@ -122,11 +122,11 @@ class ArticleEnhancerTest extends \OCA\AppFramework\Utility\TestUtility { ->will($this->returnValue($file)); $this->purifier->expects($this->once()) ->method('purify') - ->with($this->equalTo('
rawr
')) - ->will($this->returnValue('
rawr
')); + ->with($this->equalTo('
hiho
rawr
')) + ->will($this->returnValue('
hiho
rawr
')); $result = $this->testEnhancer->enhance($item); - $this->assertEquals('
rawr
', $result->getBody()); + $this->assertEquals('
hiho
rawr
', $result->getBody()); } -- cgit v1.2.3