Skip to content

Commit

Permalink
Add testcase for nonexistent property
Browse files Browse the repository at this point in the history
  • Loading branch information
flack committed Dec 14, 2019
1 parent 8de2d74 commit f81b08c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/org/openpsa/httplib/helpersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ public function test_get_meta_value()
$this->assertEquals('1,1', $ret);
}

public function test_get_missing_meta_value()
{
$html = '<html><head><meta name="not-what-were-looking-for" content="1,1"></head></html>';
$ret = org_openpsa_httplib_helpers::get_meta_value($html, 'icbm');
$this->assertEquals(null, $ret);
}

public function test_get_anchor_values()
{
$html = '<a rel="tag" title="tag title" href="tag-link" class="test">dummy</a>';
Expand Down

0 comments on commit f81b08c

Please sign in to comment.