File tree 7 files changed +17
-15
lines changed
tests/TestCase/Controller
7 files changed +17
-15
lines changed Original file line number Diff line number Diff line change
1
+ composer.lock
2
+ /vendor
3
+
1
4
# IDE and editor specific files #
2
5
# ################################
3
6
/nbproject
Original file line number Diff line number Diff line change 22
22
"source" : " https://github.com/passbolt/passbolt"
23
23
},
24
24
"require" : {
25
- "cakephp/cakephp" : " ^3.5 "
25
+ "cakephp/cakephp" : " ^3.7 "
26
26
},
27
27
"require-dev" : {
28
28
"phpunit/phpunit" : " ^5.7|^6.0"
Original file line number Diff line number Diff line change 17
17
use App \Controller \AppController ;
18
18
use Cake \Core \Configure ;
19
19
use Cake \Event \Event ;
20
- use Cake \Network \Exception \HttpException ;
21
- use Cake \Network \Exception \NotFoundException ;
20
+ use Cake \Http \Exception \HttpException ;
21
+ use Cake \Http \Exception \NotFoundException ;
22
22
use Cake \ORM \TableRegistry ;
23
23
use Cake \Validation \Validation ;
24
24
@@ -56,7 +56,7 @@ public function showLastEmail($username)
56
56
throw new HttpException (__ ('Username not correct ' ));
57
57
}
58
58
// If username doesn't exist, we return an error.
59
- $ Users = TableRegistry::get ('Users ' );
59
+ $ Users = TableRegistry::getTableLocator ()-> get ('Users ' );
60
60
$ u = $ Users ->find ('all ' )
61
61
->where (['username ' => $ username ])
62
62
->first ();
@@ -65,7 +65,7 @@ public function showLastEmail($username)
65
65
if (empty ($ u )) {
66
66
throw new HttpException (__ ('The username does not exist. ' ));
67
67
}
68
- $ EmailQueue = TableRegistry::get ('EmailQueue.EmailQueue ' );
68
+ $ EmailQueue = TableRegistry::getTableLocator ()-> get ('EmailQueue.EmailQueue ' );
69
69
$ email = $ EmailQueue ->find ('all ' )
70
70
->where (['email ' => $ username ])
71
71
->order (['created ' => 'DESC ' ])
Original file line number Diff line number Diff line change 18
18
use App \Shell \Task \InstallTask ;
19
19
use Cake \Core \Configure ;
20
20
use Cake \Event \Event ;
21
- use Cake \Network \Exception \InternalErrorException ;
22
- use Cake \Network \Exception \NotFoundException ;
21
+ use Cake \Http \Exception \InternalErrorException ;
22
+ use Cake \Http \Exception \NotFoundException ;
23
23
24
24
class ResetInstanceController extends AppController
25
25
{
Original file line number Diff line number Diff line change 16
16
17
17
use App \Controller \AppController ;
18
18
use Cake \Event \Event ;
19
- use Cake \Network \Exception \BadRequestException ;
20
- use Cake \Network \Exception \ForbiddenException ;
21
- use Cake \Network \Exception \InternalErrorException ;
22
- use Cake \Network \Exception \NotFoundException ;
19
+ use Cake \Http \Exception \BadRequestException ;
20
+ use Cake \Http \Exception \ForbiddenException ;
21
+ use Cake \Http \Exception \InternalErrorException ;
22
+ use Cake \Http \Exception \NotFoundException ;
23
23
24
24
class SimulateErrorController extends AppController
25
25
{
Original file line number Diff line number Diff line change 12
12
* @link https://www.passbolt.com Passbolt(tm)
13
13
* @since 2.0.0
14
14
*/
15
- namespace App \Test \TestCase \Controller \SeleniumTests ;
15
+ namespace PassboltSeleniumApi \Test \TestCase \Controller \SeleniumTests ;
16
16
17
17
use App \Test \Lib \AppIntegrationTestCase ;
18
18
use PassboltSeleniumApi \Controller \ConfigController ;
Original file line number Diff line number Diff line change 12
12
* @link https://www.passbolt.com Passbolt(tm)
13
13
* @since 2.0.0
14
14
*/
15
-
16
- namespace App \Test \TestCase \Controller \SeleniumTests ;
15
+ namespace PassboltSeleniumApi \Test \TestCase \Controller \SeleniumTests ;
17
16
18
17
use App \Test \Lib \AppIntegrationTestCase ;
19
18
use Cake \Core \Configure ;
20
19
21
20
class SimulateErrorsControllerTest extends AppIntegrationTestCase
22
21
{
23
- public $ fixtures = ['app.Base/users ' ];
22
+ public $ fixtures = ['app.Base/Users ' ];
24
23
25
24
public function testSimulateError404 ()
26
25
{
You can’t perform that action at this time.
0 commit comments