Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
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
(
)
{