CakeDC\Users\Test\TestCase\Controller\Traits\PasswordManagementTraitTest::testChangePasswordWithInvalidUser PHP Метод

testChangePasswordWithInvalidUser() публичный Метод

test
public testChangePasswordWithInvalidUser ( ) : void
Результат void
    public function testChangePasswordWithInvalidUser()
    {
        $this->_mockRequestPost();
        $this->_mockAuthLoggedIn(['id' => '12312312-0000-0000-0000-000000000002', 'password' => 'invalid-pass']);
        $this->_mockFlash();
        $this->Trait->request->expects($this->once())->method('data')->will($this->returnValue(['password' => 'new', 'password_confirm' => 'new']));
        $this->Trait->Flash->expects($this->once())->method('error')->with('User was not found');
        $this->Trait->changePassword();
    }