YetiForceCompany/YetiForceCRM

View on GitHub
tests/Settings/AdvancedPermission.php

Summary

Maintainability
A
1 hr
Test Coverage
A
100%

Method testEditAdvancedPermission has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testEditAdvancedPermission()
    {
        $members = ['Users:1'];
        $conditions = [
            [
Severity: Minor
Found in tests/Settings/AdvancedPermission.php - About 1 hr to fix

    Missing class import via use statement (line '108', column '27').
    Open

            $this->assertFalse((new \App\Db\Query())->from('a_#__adv_permission')->where(['id' => self::$id])->exists(), 'The record was not removed from the database ID: ' . self::$id);
    Severity: Minor
    Found in tests/Settings/AdvancedPermission.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '89', column '15').
    Open

            $row = (new \App\Db\Query())->from('a_#__adv_permission')->where(['id' => self::$id])->one();
    Severity: Minor
    Found in tests/Settings/AdvancedPermission.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '39', column '15').
    Open

            $row = (new \App\Db\Query())->from('a_#__adv_permission')->where(['id' => self::$id])->one();
    Severity: Minor
    Found in tests/Settings/AdvancedPermission.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '28', column '22').
    Open

            $recordModel = new \Settings_AdvancedPermission_Record_Model();
    Severity: Minor
    Found in tests/Settings/AdvancedPermission.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Avoid using static access to class '\Settings_AdvancedPermission_Record_Model' in method 'testEditAdvancedPermission'.
    Open

            $recordModel = \Settings_AdvancedPermission_Record_Model::getInstance(self::$id);
    Severity: Minor
    Found in tests/Settings/AdvancedPermission.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Json' in method 'testAddAdvancedPermission'.
    Open

            $this->assertSame(\App\Json::encode($members), $row['members']);
    Severity: Minor
    Found in tests/Settings/AdvancedPermission.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Json' in method 'testAddAdvancedPermission'.
    Open

            $this->assertSame(\App\Json::encode([]), $row['conditions']);
    Severity: Minor
    Found in tests/Settings/AdvancedPermission.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Json' in method 'testEditAdvancedPermission'.
    Open

            $this->assertSame(\App\Json::encode($members), $row['members']);
    Severity: Minor
    Found in tests/Settings/AdvancedPermission.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Json' in method 'testEditAdvancedPermission'.
    Open

            $this->assertSame(\App\Json::encode($conditions), $row['conditions']);
    Severity: Minor
    Found in tests/Settings/AdvancedPermission.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\Settings_AdvancedPermission_Record_Model' in method 'testDelteAdvancedPermission'.
    Open

            $recordModel = \Settings_AdvancedPermission_Record_Model::getInstance(self::$id);
    Severity: Minor
    Found in tests/Settings/AdvancedPermission.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Define a constant instead of duplicating this literal "action" 4 times.
    Open

            $recordModel->set('action', 0);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by sonar-php

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "a_#__adv_permission" 3 times.
    Open

            $row = (new \App\Db\Query())->from('a_#__adv_permission')->where(['id' => self::$id])->one();
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by sonar-php

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "No record id: " 3 times.
    Open

            $this->assertNotFalse($row, 'No record id: ' . self::$id);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by sonar-php

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "status" 4 times.
    Open

            $recordModel->set('status', 0);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by sonar-php

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "tabid" 4 times.
    Open

            $recordModel->set('tabid', 4);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by sonar-php

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "members" 4 times.
    Open

            $recordModel->set('members', $members);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by sonar-php

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "conditions" 4 times.
    Open

            $recordModel->set('conditions', []);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by sonar-php

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "priority" 4 times.
    Open

            $recordModel->set('priority', 0);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by sonar-php

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Call to undeclared method \App\Db\Query::from
    Open

            $row = (new \App\Db\Query())->from('a_#__adv_permission')->where(['id' => self::$id])->one();
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertSame
    Open

            $this->assertSame(0, $row['priority']);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \App\Db\Query::from
    Open

            $this->assertFalse((new \App\Db\Query())->from('a_#__adv_permission')->where(['id' => self::$id])->exists(), 'The record was not removed from the database ID: ' . self::$id);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertNotFalse
    Open

            $this->assertNotFalse($row, 'No record id: ' . self::$id);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertSame
    Open

            $this->assertSame('test edit', $row['name']);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertSame
    Open

            $this->assertSame(1, $row['status']);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertSame
    Open

            $this->assertSame(0, $row['status']);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \App\Db\Query::from
    Open

            $row = (new \App\Db\Query())->from('a_#__adv_permission')->where(['id' => self::$id])->one();
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertSame
    Open

            $this->assertSame(0, $row['action']);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertNotFalse
    Open

            $this->assertNotFalse($recordModel, 'No record id: ' . self::$id);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertNotFalse
    Open

            $this->assertNotFalse($row, 'No record id: ' . self::$id);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertSame
    Open

            $this->assertSame(\App\Json::encode($conditions), $row['conditions']);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertSame
    Open

            $this->assertSame(4, $row['tabid']);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertSame
    Open

            $this->assertSame(\App\Json::encode([]), $row['conditions']);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertSame
    Open

            $this->assertSame(\App\Json::encode($members), $row['members']);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertFalse
    Open

            $this->assertFalse((new \App\Db\Query())->from('a_#__adv_permission')->where(['id' => self::$id])->exists(), 'The record was not removed from the database ID: ' . self::$id);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertSame
    Open

            $this->assertSame(4, $row['tabid']);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertSame
    Open

            $this->assertSame(0, $row['priority']);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertSame
    Open

            $this->assertSame('test', $row['name']);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertSame
    Open

            $this->assertSame(\App\Json::encode($members), $row['members']);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Call to undeclared method \Tests\Settings\AdvancedPermission::assertSame
    Open

            $this->assertSame(0, $row['action']);
    Severity: Critical
    Found in tests/Settings/AdvancedPermission.php by phan

    Avoid variables with short names like $id. Configured minimum length is 3.
    Open

        private static $id;
    Severity: Minor
    Found in tests/Settings/AdvancedPermission.php by phpmd

    ShortVariable

    Since: 0.2

    Detects when a field, local, or parameter has a very short name.

    Example

    class Something {
        private $q = 15; // VIOLATION - Field
        public static function main( array $as ) { // VIOLATION - Formal
            $r = 20 + $this->q; // VIOLATION - Local
            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                $r += $this->q;
            }
        }
    }

    Source https://phpmd.org/rules/naming.html#shortvariable

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->set('status', 0);

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'joincondition' => '',

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'value' => 'ek',

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->set('members', $members);

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'fieldname' => 'salutationtype',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'operation' => 'is',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'value' => 'Mr.',

    Spaces must be used to indent lines; tabs are not allowed
    Open

        private static $id;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->set('tabid', 4);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertSame(0, $row['action']);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $conditions = [

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'valuetype' => 'rawtext',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'fieldname' => 'firstname',

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->set('conditions', []);

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->save();

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->set('priority', 0);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertSame(0, $row['status']);

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function testEditAdvancedPermission()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Advanced permission id.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Testing advanced permission creation.

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertNotFalse($row, 'No record id: ' . self::$id);

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'groupid' => 0,

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel = new \Settings_AdvancedPermission_Record_Model();

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $members = ['Users:1'];

    Spaces must be used to indent lines; tabs are not allowed
    Open

            self::$id = $recordModel->getId();

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertSame(\App\Json::encode($members), $row['members']);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->set('name', 'test');

    Spaces must be used to indent lines; tabs are not allowed
    Open

                [

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->set('action', 0);

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Testing advanced permission edition.

    Spaces must be used to indent lines; tabs are not allowed
    Open

                [

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $row = (new \App\Db\Query())->from('a_#__adv_permission')->where(['id' => self::$id])->one();

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertSame(\App\Json::encode($members), $row['members']);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertNotFalse($recordModel, 'No record id: ' . self::$id);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertSame(0, $row['priority']);

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Testing advanced permission deletion.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $members = ['Users:1', 'Groups:3', 'Roles:H6', 'RoleAndSubordinates:H34'];

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $row = (new \App\Db\Query())->from('a_#__adv_permission')->where(['id' => self::$id])->one();

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertSame(0, $row['priority']);

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'groupjoin' => 'and',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'operation' => 'contains',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'valuetype' => 'rawtext',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'groupid' => 1,

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->set('status', 1);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertSame(0, $row['action']);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertSame(\App\Json::encode($conditions), $row['conditions']);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->set('action', 0);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->set('members', $members);

    Line exceeds 120 characters; contains 182 characters
    Open

            $this->assertFalse((new \App\Db\Query())->from('a_#__adv_permission')->where(['id' => self::$id])->exists(), 'The record was not removed from the database ID: ' . self::$id);

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'groupjoin' => null,

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertSame(4, $row['tabid']);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertSame(1, $row['status']);

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function testDelteAdvancedPermission()

    Spaces must be used to indent lines; tabs are not allowed
    Open

            ];

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->save();

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'joincondition' => '',

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertSame('test edit', $row['name']);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertFalse((new \App\Db\Query())->from('a_#__adv_permission')->where(['id' => self::$id])->exists(), 'The record was not removed from the database ID: ' . self::$id);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->set('priority', 0);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertNotFalse($row, 'No record id: ' . self::$id);

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->set('name', 'test edit');

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->set('conditions', $conditions);

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function testAddAdvancedPermission()

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertSame('test', $row['name']);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertSame(4, $row['tabid']);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->assertSame(\App\Json::encode([]), $row['conditions']);

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel = \Settings_AdvancedPermission_Record_Model::getInstance(self::$id);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->delete();

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel = \Settings_AdvancedPermission_Record_Model::getInstance(self::$id);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordModel->set('tabid', 4);

    There are no issues that match your filters.

    Category
    Status