Hi,
Currently using SimpleTest simpletest_1.0.1beta
How can i assert for a pattern within a link, example below.
PHP Code:
<a class="action" href="/index.php/AdStyles/create" title="Create a new ad style">
<img width="16" height="16" src="/images/newArticle_ico16.png" alt="New Ad Style"/>
New Ad Style
</a>
Basically i want to assert that the links exists and can be clicked eg
But there is an image within the link, and the link has no id.
This assertion does not work.
PHP Code:
$this->assertLink('<img alt="New Ad Style" src="/images/newArticle_ico16.png" height="16" width="16" />New Ad Style');
PHP Code:
var_dump($this->_browser->_page->_links);
object(SimpleAnchorTag)#696 (3) {
["_name"]=>
string(1) "a"
["_attributes"]=>
array(3) {
["title"]=>
string(21) "Create a new ad style"
["class"]=>
string(6) "action"
["href"]=>
string(26) "/index.php/AdStyles/create"
}
["_content"]=>
string(96) "<img alt="New Ad Style" src="/images/newArticle_ico16.png" height="16" width="16" />New Ad Style"
}
Is this link untestable ?
.
Bookmarks