OK, maybe im not getting this right. Im new to Unit testing. But I want to test something like this:
I have an action that display tickets for user to do on current day. I want to make assertion that will check if: if there is 0 tickets then the messages says "no tickets for today", if there are > 0 tickets than system displays table. I know how to check if view renders a message or renders a table, but how to make an "if" in the test? Something like:
<code>
if(count($tickets > 0) {
$this->assertQuery('table');
} else {
$this->assertQueryContentContains('#message', 'No tickets for today');
}
</code>
I dont get how to make a stubb data or get value of a certain variable from action.