waitUntilVisible()->one(); if ($expected === TEST_GOOD) { $message->isGood(); } elseif ($expected === TEST_BAD) { $message->isBad(); } else { $message->isWarning(); } if ($title !== null) { $this->test->assertEquals($title, $message->getTitle(), 'Message title and the expected title do not match.'); } if ($details !== null) { if (!is_array($details)) { $details = [$details]; } foreach ($details as $detail) { $this->test->assertTrue($message->hasLine($detail), 'Line "'.$detail.'" was not found in message details'); } } } }