/** * @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()); }
/** * @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()); }