Reputation: 1983
In PHPUnit, I want to use methods like verifyText()
with an optional message as the last parameter, like I do with assertStringEquals($expected, $actual, $message)
. It doesn't seem to work. Am I missing something?
I would tell myself to read the code, but I tried and I can't even figure out how any of the verify()
methods get called. It must be some __call()
function but I don't see it. So that's my follow-up question, how do the verify()
methods get called? Then I could override them if I want.
Upvotes: 0
Views: 128
Reputation: 21
I'm exploring the same question, albeit in the context of Selenium.
I found, grepping the source, an array $autoGeneratedCommands, which is set up in SeleniumTestCase/Driver. The mechanism here implements/maps verifyTextPresent() by a call to verifyCommand(), which calls assertCommand(). Subsequently one of the family assert*() is called... omitting the message in the call. This seems like an inadvertant feature to me. Well, coded bug.
Upvotes: 1