summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
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']));
}