zendframework / zend-test

Test component from Zend Framework
BSD 3-Clause "New" or "Revised" License
18 stars 38 forks source link

AbstractHttpControllerTestCase::assertQueryContentRegex() only checks first match #32

Closed RalfEggert closed 8 years ago

RalfEggert commented 8 years ago

When I use the AbstractHttpControllerTestCase::assertQueryContentRegex() method, I figured out that only the first match is checked. Please look here:

https://github.com/zendframework/zend-test/blob/master/src/PHPUnit/Controller/AbstractHttpControllerTestCase.php#L796

It only uses the $result->current()->nodeValue and does not loop through all matches.

Is this a bug or is it this behaviour wanted?

RalfEggert commented 8 years ago

Added a PR to solve the issue. Contains an extra unit test as well

RalfEggert commented 8 years ago

Who is taking care of Zend\Test these days?

@weierophinney @ezimuel @Ocramius @anyone

This issue is really annoying and stops me and colleagues from writing proper tests. Please look at the PR #33 which fixes it. Thanks!