code coverage
This commit is contained in:
parent
ed222ef320
commit
93fa9500b7
|
@ -21,7 +21,10 @@ class ComicPressComicPost {
|
|||
if (is_object($backend)) {
|
||||
$a = $backend;
|
||||
}
|
||||
$attachments = array_merge($attachments, $a->generate_from_post($this->post));
|
||||
$result = $a->generate_from_post($this->post);
|
||||
if (is_array($result)) {
|
||||
$attachments = array_merge($attachments, $result);
|
||||
}
|
||||
}
|
||||
return $attachments;
|
||||
}
|
||||
|
|
|
@ -232,6 +232,14 @@ class ComicPressComicPostTest extends PHPUnit_Framework_TestCase {
|
|||
|
||||
$this->assertEquals($expected_result, $p->get_attachments_with_children());
|
||||
}
|
||||
|
||||
|
||||
function testGetAttachmentsStringProvided() {
|
||||
$cp = ComicPress::get_instance(true);
|
||||
$m = $this->getMock('TestFactory', array('generate_from_post'));
|
||||
$cp->backends = array(get_class($m));
|
||||
$this->p->get_attachments();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue