HtmlValidatorTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testException() 0 5 1
A testCheckTrue() 0 5 1
1
<?php
2
3
/*
4
 * This file is part of the hogosha-monitor package
5
 *
6
 * Copyright (c) 2016 Guillaume Cavana
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * Feel free to edit as you please, and have fun.
12
 *
13
 * @author Guillaume Cavana <[email protected]>
14
 */
15
16
namespace Hogosha\Monitor\Validator;
17
18
/**
19
 * @author Guillaume Cavana <[email protected]>
20
 */
21
class HtmlValidatorTest extends \PHPUnit_Framework_TestCase
22
{
23
    /**
24
     * testException.
25
     *
26
     * @expectedException Hogosha\Monitor\Exception\ValidatorException
27
     * @expectedExceptionMessage this string "/damme/" cannot be found
28
     */
29
    public function testException()
30
    {
31
        $htmlValidator = new HtmlValidator();
32
        $htmlValidator->check('chuck norris', '/damme/');
33
    }
34
35
    /**
36
     * testCheckTrue.
37
     */
38
    public function testCheckTrue()
39
    {
40
        $htmlValidator = new HtmlValidator();
41
        $this->assertNull($htmlValidator->check('chuck norris', '/chuck/'));
42
    }
43
}
44