Completed
Pull Request — master (#208)
by Matthew
03:23
created

IrcColourCodeTest::tearDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
class IrcColourCodeTest extends PHPUnit_Framework_TestCase
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
4
{
5
    private $irc;
6
7
	public function setUp()
8
	{
9
10
		$this->irc = new IrcColourCode();
11
	}
12
13
	public function tearDown() {
14
        $this->irc = NULL;
15
    }
16
17
    public function test_colorCodes() {
0 ignored issues
show
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
18
19
        $i = $this->irc;
20
21
        $this->assertEquals($i::BOLD,"\x02");
22
        $this->assertEquals($i::ITALIC, "\x09");
23
        $this->assertEquals($i::STRIKE, "\x13");
24
        $this->assertEquals($i::UNDERLINE, "\x15");
25
        $this->assertEquals($i::UNDERLINE2, "\x1f");
26
        $this->assertEquals($i::REVERSE, "\x16");
27
        $this->assertEquals($i::RESET, "\x0f");
28
29
        $this->assertEquals($i::WHITE, "\x0300");
30
        $this->assertEquals($i::BLACK, "\x0301");
31
        $this->assertEquals($i::DARK_BLUE, "\x0302");
32
        $this->assertEquals($i::DARK_GREEN, "\x0303");
33
        $this->assertEquals($i::RED, "\x0304");
34
        $this->assertEquals($i::DARK_RED, "\x0305");
35
        $this->assertEquals($i::DARK_VIOLET, "\x0306");
36
        $this->assertEquals($i::ORANGE, "\x0307");
37
        $this->assertEquals($i::YELLOW, "\x0308");
38
        $this->assertEquals($i::LIGHT_GREEN, "\x0309");
39
        $this->assertEquals($i::CYAN, "\x0310");
40
        $this->assertEquals($i::LIGHT_CYAN, "\x0311");
41
        $this->assertEquals($i::BLUE, "\x0312");
42
        $this->assertEquals($i::VIOLET, "\x0313");
43
        $this->assertEquals($i::DARK_GREY, "\x0314");
44
        $this->assertEquals($i::LIGHT_GREY, "\x0315");
45
46
        $this->assertNotEquals($i::BOLD,"\x021");
47
        $this->assertNotEquals($i::ITALIC, "\x091");
48
        $this->assertNotEquals($i::STRIKE, "\x131");
49
        $this->assertNotEquals($i::UNDERLINE, "\x151");
50
        $this->assertNotEquals($i::UNDERLINE2, "\x1f1");
51
        $this->assertNotEquals($i::REVERSE, "\x161");
52
        $this->assertNotEquals($i::RESET, "\x0f1");
53
54
        $this->assertNotEquals($i::WHITE, "\x03001");
55
        $this->assertNotEquals($i::BLACK, "\x03011");
56
        $this->assertNotEquals($i::DARK_BLUE, "\x03021");
57
        $this->assertNotEquals($i::DARK_GREEN, "\x03031");
58
        $this->assertNotEquals($i::RED, "\x03041");
59
        $this->assertNotEquals($i::DARK_RED, "\x03051");
60
        $this->assertNotEquals($i::DARK_VIOLET, "\x03061");
61
        $this->assertNotEquals($i::ORANGE, "\x03071");
62
        $this->assertNotEquals($i::YELLOW, "\x03081");
63
        $this->assertNotEquals($i::LIGHT_GREEN, "\x03091");
64
        $this->assertNotEquals($i::CYAN, "\x03101");
65
        $this->assertNotEquals($i::LIGHT_CYAN, "\x03111");
66
        $this->assertNotEquals($i::BLUE, "\x03121");
67
        $this->assertNotEquals($i::VIOLET, "\x03131");
68
        $this->assertNotEquals($i::DARK_GREY, "\x03141");
69
        $this->assertNotEquals($i::LIGHT_GREY, "\x03151");
70
    }
71
72
}
73