/** * Test OrderState Mail */ public function testSetStateShouldSetMailtypeToState() { $statusMock = $this->getMockBuilder('\\Shopware\\Models\\Order\\Status')->disableOriginalConstructor()->getMock(); $statusMock->expects($this->any())->method('getGroup')->will($this->returnValue(\Shopware\Models\Order\Status::GROUP_STATE)); $mail = new Mail(); $mail->setStatus($statusMock); $this->assertEquals(Mail::MAILTYPE_STATE, $mail->getMailtype()); }