HtmlValidatorTest::testCheckTrue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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