3 changed files with 13 additions and 8 deletions
@ -1,7 +1,8 @@ |
|||||||
<?php namespace Tests\Aauth\Database; |
<?php namespace Tests\Aauth\Database; |
||||||
|
|
||||||
|
use Config\Aauth as AauthConfig; |
||||||
use CodeIgniter\Test\CIDatabaseTestCase; |
use CodeIgniter\Test\CIDatabaseTestCase; |
||||||
use App\Models\Aauth\UserModel as UserModel; |
use App\Models\Aauth\UserModel; |
||||||
|
|
||||||
class UserModelTest extends CIDatabaseTestCase |
class UserModelTest extends CIDatabaseTestCase |
||||||
{ |
{ |
||||||
@ -84,8 +85,8 @@ class UserModelTest extends CIDatabaseTestCase |
|||||||
|
|
||||||
public function testLoginUseUsernameDummy() |
public function testLoginUseUsernameDummy() |
||||||
{ |
{ |
||||||
$config = new \Config\Aauth(); |
$config = new AauthConfig(); |
||||||
$config->loginUseUsername = TRUE; |
$config->loginUseUsername = true; |
||||||
|
|
||||||
$this->model = new UserModel($this->db, null, $config); |
$this->model = new UserModel($this->db, null, $config); |
||||||
$newUser = $this->model->insert(['email' => '[email protected]', 'password' => 'password123456']); |
$newUser = $this->model->insert(['email' => '[email protected]', 'password' => 'password123456']); |
||||||
|
@ -83,7 +83,6 @@ class UserTest extends CIDatabaseTestCase |
|||||||
|
|
||||||
$this->library->clearInfos(); |
$this->library->clearInfos(); |
||||||
$this->assertFalse($this->library->updateUser(2, '[email protected]', null, null)); |
$this->assertFalse($this->library->updateUser(2, '[email protected]', null, null)); |
||||||
print_r($this->library->getUser(2)); |
|
||||||
$this->assertEquals(lang('Aauth.existsAlreadyEmail'), $this->library->getErrorsArray()[0]); |
$this->assertEquals(lang('Aauth.existsAlreadyEmail'), $this->library->getErrorsArray()[0]); |
||||||
|
|
||||||
$this->library->clearErrors(); |
$this->library->clearErrors(); |
||||||
|
Loading…
Reference in new issue