Passed
Push — develop ( 963cc8...d9b475 )
by Schlaefer
04:33
created

UsersControllerTest::testDelete()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 50
Code Lines 24

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 24
nc 1
nop 0
dl 0
loc 50
rs 9.536
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * Saito - The Threaded Web Forum
7
 *
8
 * @copyright Copyright (c) the Saito Project Developers
9
 * @link https://github.com/Schlaefer/Saito
10
 * @license http://opensource.org/licenses/MIT
11
 */
12
13
namespace App\Test\TestCase\Controller\Admin;
14
15
use Cake\ORM\TableRegistry;
16
use Saito\Test\IntegrationTestCase;
17
18
/**
19
 * Class CategoriesControllerTest
20
 *
21
 * @package App\Test\TestCase\Controller\Admin
22
 * @group App\Test\TestCase\Controller\Admin
23
 */
24
class UsersControllerTest extends IntegrationTestCase
25
{
26
27
    public $fixtures = [
28
        'app.Category',
29
        'app.Setting',
30
        'app.User',
31
        'app.UserBlock',
32
        'app.UserRead',
33
        'app.UserOnline',
34
    ];
35
36
    public function setUp()
37
    {
38
        parent::setUp();
39
        foreach (['Users'] as $table) {
40
            $this->$table = TableRegistry::get($table);
0 ignored issues
show
Deprecated Code introduced by
The function Cake\ORM\TableRegistry::get() has been deprecated: 3.6.0 Use \Cake\ORM\Locator\TableLocator::get() instead. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

40
            $this->$table = /** @scrutinizer ignore-deprecated */ TableRegistry::get($table);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
41
        }
42
    }
43
44
    public function testUsersIndexAccess()
45
    {
46
        $this->assertRouteForRole('/admin/users/block', 'admin');
47
    }
48
}
49