Completed
Pull Request — master (#80)
by
unknown
03:25
created

WelcomeTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 24
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testDisplayWelcomeView() 0 17 1
1
<?php
2
3
namespace App\Containers\Welcome\UI\Web\Tests\Acceptance;
4
5
use App\Port\Tests\PHPUnit\Abstracts\TestCase;
6
7
/**
8
 * Class WelcomeTest.
9
 *
10
 * @author Mahmoud Zalt <[email protected]>
11
 */
12
class WelcomeTest extends TestCase
13
{
14
15
    private $page = '/';
0 ignored issues
show
Unused Code introduced by
The property $page is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
16
17
    public function testDisplayWelcomeView()
18
    {
19
20
        // TODO: this is causing the following error:
21
        // (InvalidArgumentException: Expecting a DOMNodeList or DOMNode instance, an array, a string, or null, but got "Illuminate\View\View".)
22
        // This is probably because of the Dingo package since it's response is being used for everything even web requests..
23
        // or caused after upgrading to laravel 5.2 because of the composer requirement of `"symfony/dom-crawler": "2.8.*|3.0.*"` in case
24
        // the crawler class was updated..
25
        // if you go to `Illuminate/Foundation/Testing/Concerns/InteractsWithPages.php` and this `dd(get_class($this->response));` to line 83
26
        // you should see `Dingo\Api\Http\Response` which when we call `->getContent()` on it returns `Illuminate\View\View`
27
        // while the Crawler `vendor/symfony/dom-crawler/Crawler.php` is expecting other things as the error states.
28
        // I will fix this later...
29
30
//        $this->visit($this->page)
0 ignored issues
show
Unused Code Comprehensibility introduced by
65% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
31
//            ->see('Hello API');
32
33
    }
34
35
}
36