Use convenience methods to create a (case-insensitive) negation matcher

This commit is contained in:
ndm2 2014-03-02 17:56:35 +01:00
parent 70a1b87db6
commit 1015b38a27

View file

@ -229,7 +229,7 @@ class SmtpTransportTest extends CakeTestCase {
* @return void * @return void
*/ */
public function testAuthNoAuth() { public function testAuthNoAuth() {
$this->socket->expects($this->any())->method('write')->with(new PHPUnit_Framework_Constraint_Not("AUTH LOGIN\r\n")); $this->socket->expects($this->any())->method('write')->with($this->logicalNot($this->stringContains('AUTH LOGIN')));
$this->SmtpTransport->config(array('username' => null, 'password' => null)); $this->SmtpTransport->config(array('username' => null, 'password' => null));
$this->SmtpTransport->auth(); $this->SmtpTransport->auth();