Completed
Pull Request — master (#1)
by Guillaume
07:09
created

HtmlValidatorTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 22
rs 10
c 1
b 0
f 0
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
namespace Hogosha\Monitor\Validator;
4
5
/**
6
 * @author Guillaume Cavana <[email protected]>
7
 */
8
class HtmlValidatorTest extends \PHPUnit_Framework_TestCase
9
{
10
    /**
11
     * testException
12
     * @expectedException Hogosha\Monitor\Exception\ValidatorException
13
     * @expectedExceptionMessage this string "/damme/" cannot be found
14
     */
15
    public function testException()
16
    {
17
        $htmlValidator = new HtmlValidator();
18
        $htmlValidator->check('chuck norris', '/damme/');
19
    }
20
21
    /**
22
     * testCheckTrue
23
     */
24
    public function testCheckTrue()
25
    {
26
        $htmlValidator = new HtmlValidator();
27
        $this->assertNull($htmlValidator->check('chuck norris', '/chuck/'));
28
    }
29
}
30