예제 #1
0
 /**
  * @covers \Magento\Framework\Message\AbstractMessage::toString
  */
 public function testToString()
 {
     $someText = 'some text';
     $expectedString = TestingMessage::TYPE_TESTING . ': testing_message: ' . $someText;
     $this->model->setIdentifier('testing_message');
     $this->model->setText($someText);
     $this->assertEquals($expectedString, $this->model->toString());
 }
예제 #2
0
 /**
  * @covers \Magento\Framework\Message\AbstractMessage::toString
  */
 public function testToString()
 {
     $someText = 'some text';
     $expectedString = MessageInterface::TYPE_SUCCESS . ': ' . $someText;
     $this->model->expects($this->atLeastOnce())->method('getType')->will($this->returnValue(MessageInterface::TYPE_SUCCESS));
     $this->model->setText($someText);
     $this->assertEquals($expectedString, $this->model->toString());
 }