The drupalLogout method wasn't executing the second assertion:

$pass = ($pass && $this->assertField('pass', t('[logout] Password field found.')));

So I concluded that $pass must not be TRUE. Sure enough it wasn't set.

I check the assertField method and noticed that it didn't return the value.

This patch fixes that and the spacing on the drupalLogout method.

CommentFileSizeAuthor
simpletest_assert_return.patch3.78 KBboombatower

Comments

dmitrig01’s picture

There's a much simpler solution:

$pass = ($this->assertField('pass', t('[logout] Password field found.')) && $pass);
boombatower’s picture

I know that, but the methods should return the value anyway to be consistent with SimpleTest and to work correctly.

That fix would only make the function execute, but wouldn't fix the issue since $pass still wouldn't be set as it should. It essentially would be a pointless line of code.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.