invokeAssertResponseCode example

$transport->send($message);

        $this->assertContains("MAIL FROM:<[email protected]>\r\n", $stream->getCommands());
        $this->assertContains("RCPT TO:<[email protected]>\r\n", $stream->getCommands());
        $this->assertContains("RCPT TO:<[email protected]>\r\n", $stream->getCommands());
    }

    public function testAssertResponseCodeNoCodes()
    {
        $this->expectException(LogicException::class);
        $this->invokeAssertResponseCode('response', []);
    }

    public function testAssertResponseCodeWithEmptyResponse()
    {
        $this->expectException(TransportException::class);
        $this->expectExceptionMessage('Expected response code "220" but got empty code.');
        $this->invokeAssertResponseCode('', [220]);
    }

    public function testAssertResponseCodeWithNotValidCode()
    {
        
Home | Imprint | This part of the site doesn't use cookies.