FaviconHelperTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 23
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A itShouldCheckStatusAndReturnTrueIfFaviconExist() 0 6 1
A itShouldCheckStatusAndReturnFalseIfFaviconNotExist() 0 6 1
1
<?php
2
3
namespace FaviconFinder\Tests\src\Services;
4
5
use FaviconFinder\src\Services\FaviconHelper;
6
7
class FaviconHelperTest extends \PHPUnit_Framework_TestCase
8
{
9
    /**
10
     * @test
11
     */
12
    public function itShouldCheckStatusAndReturnTrueIfFaviconExist()
13
    {
14
        $isFaviconAvailable = FaviconHelper::check("http://packagist.com/");
15
        
16
        $this->assertTrue($isFaviconAvailable);
17
    }
18
    
19
    /**
20
     * @test
21
     */
22
    public function itShouldCheckStatusAndReturnFalseIfFaviconNotExist()
23
    {        
24
        $isFaviconAvailable = FaviconHelper::check("http://notavaliddomain.test");
25
        
26
        $this->assertFalse($isFaviconAvailable);
27
    }
28
29
}
30