-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix assertTemplateName()
checking only the first leaf in the view model tree.
#87
Conversation
Please use descriptive title. It will be an entry in the release notes. |
assertTemplateName
returns too early
assertTemplateName
returns too earlyassertTemplateName
returns too early
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes LGTM but the location of the test method should be moved AFAICT.
assertTemplateName
returns too earlyassertTemplateName()
checking only the first leaf in the view model tree.
…ll children until found. Added test case and supporting assets to test nested views. Signed-off-by: Eric Richer [email protected] <[email protected]>
…prove test case to test deeper viewer hierarchy Signed-off-by: Eric Richer [email protected] <[email protected]>
…php and deleted TemplateNameTest.php Signed-off-by: Eric Richer [email protected] <[email protected]>
Tests for the template assertion seem to be missing for a case where templates are not found, or found for Use try catch block instead of expected exception assertion because assertion exceptions are PhpUnit's and might have special handling attached to them. |
… when the template is not found and the 'assertNotTemplateName' fails when the template is found Signed-off-by: Eric Richer [email protected] <[email protected]>
That was counter intuitive. Adding tests to check that PHPUnit fails... |
Well, we are not checking that phpunit fails. We are checking that assertion succeeds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you think this was over? 😉
There are some QA changes I want you to address before it is ready.
… the template is not found and the 'assertNotTemplateName' fails when the template is found. to separate test cases. Signed-off-by: Eric Richer [email protected] <[email protected]>
08b85fc
to
3a8099a
Compare
Signed-off-by: Eric Richer [email protected] <[email protected]>
…ertTemplateName()' and 'assertNotTemplateName()' Signed-off-by: Eric Richer [email protected] <[email protected]>
…eNameFailsWhenNotFound()' and 'testAssertNotTemplateNameFailsWhenFound()' Signed-off-by: Eric Richer [email protected] <[email protected]>
CI run stuck |
@visto9259 thank you |
Description
Fixes #3.
The protected function
AbstractControllerTestCase::searchTemplates()
will now traverse all view model children until the template is found, returning false if not found in any children.