IconFinderTest::itShouldReturnTrueIfFaviconExist()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
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