Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

assertQueryContentContains searching through all nodes found #5212

Closed
wants to merge 3 commits into from

Conversation

EpeeCheeze
Copy link
Contributor

When content is not in the first node of the document, assertQueryContentContains does not find it. This change checks all the nodes for the content when using the AbstractHttpControllerTestCase.

@@ -330,25 +330,23 @@ public function testAssertXpathQueryCountMax()
public function testAssertQueryContentContains()
{
$this->dispatch('/tests');
$this->assertQueryContentContains('div#content', 'foo');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead change this test case please add a new one

@Maks3w
Copy link
Member

Maks3w commented Oct 4, 2013

I think that there are two scenarios here.

  • At least one result have content
  • All results must have content

Could you elaborate this a bit more for cover both scenarios?

Thank you

@EpeeCheeze
Copy link
Contributor Author

The documentation states that this query looks for at least one of the nodes contains the element. This is also the same functionality that was in ZF1.

weierophinney added a commit that referenced this pull request Oct 23, 2013
assertQueryContentContains searching through all nodes found
weierophinney added a commit that referenced this pull request Oct 23, 2013
- Incorporated feedback from @Maks3w
- ensured all multi-line sprint() calls had one argument per line
weierophinney added a commit that referenced this pull request Oct 23, 2013
@ghost ghost assigned weierophinney Oct 23, 2013
weierophinney added a commit to zendframework/zend-test that referenced this pull request May 15, 2015
…aster

assertQueryContentContains searching through all nodes found
weierophinney added a commit to zendframework/zend-test that referenced this pull request May 15, 2015
- Incorporated feedback from @Maks3w
- ensured all multi-line sprint() calls had one argument per line
weierophinney added a commit to zendframework/zend-test that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-test that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants