/** * @depends testAddInstantWarningMessage */ public function testAddInstantErrorMessage(\Krucas\Notification\NotificationsBag $bag) { $bag->errorInstant('e m'); $this->assertCount(10, $bag->all()); $this->assertInstanceOf('Krucas\\Notification\\Collection', $bag->all()); $this->assertInstanceOf('Krucas\\Notification\\Message', $bag->get('error')[2]); $this->assertEquals('e m', $bag->get('error')[2]->getMessage()); $this->assertEquals('error', $bag->get('error')[2]->getType()); $this->assertEquals('<div class="alert alert-:type">:message</div>', $bag->get('error')[2]->getFormat()); $this->assertFalse($bag->get('error')[2]->isFlashable()); return $bag; }