get() public méthode

Returns all messages for given type.
public get ( $type ) : Krucas\Notification\Collection
$type
Résultat Krucas\Notification\Collection
 /**
  * @depends testGetErrorMessageContainer
  */
 public function testGetFirstMessageFromContainer(\Krucas\Notification\NotificationsBag $bag)
 {
     $this->assertInstanceOf('Krucas\\Notification\\Message', $bag->get('error')->first());
     $this->assertEquals('test error', $bag->get('error')->first()->getMessage());
     $this->assertEquals('error', $bag->get('error')->first()->getType());
     $this->assertEquals(':message!', $bag->get('error')->first()->getFormat());
     return $bag;
 }