luyadev/luya-module-cms

View on GitHub
tests/src/admin/apis/NavControllerTest.php

Summary

Maintainability
D
1 day
Test Coverage

File NavControllerTest.php has 331 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace cmstests\src\admin\apis;

use cmstests\WebModelTestCase;
Severity: Minor
Found in tests/src/admin/apis/NavControllerTest.php - About 3 hrs to fix

    Method testActionToggleHome has 75 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function testActionToggleHome()
        {
            PermissionScope::run($this->app, function (PermissionScope $scope) {
                $this->createAdminLangFixture();
                $this->createCmsNavItemRedirectFixture();
    Severity: Major
    Found in tests/src/admin/apis/NavControllerTest.php - About 3 hrs to fix

      Method testGetProperties has 70 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function testGetProperties()
          {
              PermissionScope::run($this->app, function (PermissionScope $scope) {
                  $this->createAdminLangFixture();
                  $this->createCmsNavItemRedirectFixture();
      Severity: Major
      Found in tests/src/admin/apis/NavControllerTest.php - About 2 hrs to fix

        Method testDelete has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function testDelete()
            {
                PermissionScope::run($this->app, function (PermissionScope $scope) {
                    $this->createAdminLangFixture();
                    $this->createCmsWebsiteFixture([
        Severity: Minor
        Found in tests/src/admin/apis/NavControllerTest.php - About 1 hr to fix

          Method testActionDeepPageCopyAsTemplateSuccess has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function testActionDeepPageCopyAsTemplateSuccess()
              {
                  // success
                  PermissionScope::run($this->app, function (PermissionScope $scope) {
                      $this->createAdminLangFixture();
          Severity: Minor
          Found in tests/src/admin/apis/NavControllerTest.php - About 1 hr to fix

            Method testActionDeepPageCopyAsTemplateError has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function testActionDeepPageCopyAsTemplateError()
                {
                    // erroring
                    PermissionScope::run($this->app, function (PermissionScope $scope) {
                        $this->createAdminLangFixture();
            Severity: Minor
            Found in tests/src/admin/apis/NavControllerTest.php - About 1 hr to fix

              Method testActionTags has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function testActionTags()
                  {
                      PermissionScope::run($this->app, function (PermissionScope $scope) {
                          $scope->createAndAllowRoute('webmodel/nav/tags');
                          $scope->createAndAllowRoute('webmodel/nav/save-tags');
              Severity: Minor
              Found in tests/src/admin/apis/NavControllerTest.php - About 1 hr to fix

                There are no issues that match your filters.

                Category
                Status