suitmedia/suitcoda

View on GitHub
tests/Supports/CrawlerUrlTest.php

Summary

Maintainability
C
1 day
Test Coverage

File CrawlerUrlTest.php has 326 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace SuitTests\Supports;

use GuzzleHttp\Client;
Severity: Minor
Found in tests/Supports/CrawlerUrlTest.php - About 3 hrs to fix

    CrawlerUrlTest has 22 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class CrawlerUrlTest extends TestCase
    {
        /**
         * Setup the test environment.
         *
    Severity: Minor
    Found in tests/Supports/CrawlerUrlTest.php - About 2 hrs to fix

      Method testEncodingUrl has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function testEncodingUrl()
          {
              $client = $this->getMockClient()->makePartial();
              $domCrawler = $this->getMockDomCrawler()->makePartial();
              
      Severity: Minor
      Found in tests/Supports/CrawlerUrlTest.php - About 1 hr to fix

        Method testDoRequestHtmlWithTag has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function testDoRequestHtmlWithTag()
            {
                $html = '<!DOCTYPE html>
                    <html>
                        <head>
        Severity: Minor
        Found in tests/Supports/CrawlerUrlTest.php - About 1 hr to fix

          Method testDoRequestHtmlWithoutTag has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function testDoRequestHtmlWithoutTag()
              {
                  $html = '<!DOCTYPE html>
                      <html>
                          <body>
          Severity: Minor
          Found in tests/Supports/CrawlerUrlTest.php - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status