IconFinderTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
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 26
rs 10

2 Methods

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