Problem with AssertTag: children count wrong

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi List!

I'm trying to use phpUnit's AssertTag function to make sure that some html
code contains an ul element with exactly li items in it.

My test looks like this:


function testUnconfiguredFilter() {
 $matcher = array(
'tag' => 'ul',
'children' => array(
'count' => 3,
'only' => array('tag' => 'li')
)
);
$this->assertTag($matcher, $this->html, $message, $isHtml = FALSE);
}

the value of $html is:

<div class="flFilterbox" id="flFilterunconfiguredFilter">
<h3>unconfiguredFilter</h3>

<ul class="flFilterboxInner">
<li><a href=""> FilterValue1</a> ()</li>
<li><a href=""> FilterValue2</a> ()</li>
<li><a href=""> FilterValue3</a> ()</li>
</ul>
</div>

So I think the assertion SHOULD work - but it does not, no matter what I
use for count! Sadly PHPUnit's output ist not very helpful, all it gives me
is:

1) GeneratedFiltersTest::testUnconfiguredFilter
Failed asserting that false is true.


Has someone got an idea whats going on? This is really freakin me out,
could not find anything about it anywhere on the web.

Kind regards,
Michael

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux