summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2017-11-28 19:26:44 +0000
committerAndres Rey <[email protected]>2017-11-28 19:26:44 +0000
commitf043a9d71d08f285d0035c8505306a8a5bbbaa39 (patch)
tree427641ecee2870d9b3d9519d9c255b05296fb84d /test
parentd1bc52aad329f6bf1d4f88758ea8dc1ba3f37ab8 (diff)
Minor fixes
Diffstat (limited to 'test')
-rw-r--r--test/ReadabilityTest.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/ReadabilityTest.php b/test/ReadabilityTest.php
index d019192..93214ae 100644
--- a/test/ReadabilityTest.php
+++ b/test/ReadabilityTest.php
@@ -48,9 +48,16 @@ class ReadabilityTest extends \PHPUnit_Framework_TestCase
if ($config) {
$options = array_merge($options, $config);
}
+ $configuration = new Configuration();
+
+ foreach($options as $key => $value){
+ $name = 'set' . $key;
+ $configuration->$name($value);
+ }
- $readability = new HTMLParser($options);
+ $readability = new Readability($configuration);
$result = $readability->parse($html);
+
$this->assertEquals($expectedImages, json_encode($result['images']));
}