|
7 | 7 |
|
8 | 8 | class ConfigTest extends TestCase |
9 | 9 | { |
10 | | - public function test_it_has_uppercase_config_options() |
| 10 | + public function test_it_has_base64_config_options() |
11 | 11 | { |
12 | | - $this->assertEquals(Twine\Config\Uppercase::ALL, 'strtoupper'); |
13 | | - $this->assertEquals(Twine\Config\Uppercase::FIRST, 'ucfirst'); |
14 | | - $this->assertEquals(Twine\Config\Uppercase::WORDS, 'ucwords'); |
| 12 | + $this->assertEquals('base64_encode', Twine\Config\Base64::ENCODE); |
| 13 | + $this->assertEquals('base64_decode', Twine\Config\Base64::DECODE); |
15 | 14 | } |
16 | 15 |
|
17 | | - public function test_it_has_lowercase_config_options() |
| 16 | + public function test_it_has_equals_config_options() |
18 | 17 | { |
19 | | - $this->assertEquals(Twine\Config\Lowercase::ALL, 'strtolower'); |
20 | | - $this->assertEquals(Twine\Config\Lowercase::FIRST, 'lcfirst'); |
21 | | - $this->assertEquals(Twine\Config\Lowercase::WORDS, 'lcwords'); |
| 18 | + $this->assertEquals('strcmp', Twine\Config\Equals::CASE_SENSITIVE); |
| 19 | + $this->assertEquals('strcasecmp', Twine\Config\Equals::CASE_INSENSITIVE); |
22 | 20 | } |
23 | 21 |
|
24 | | - public function test_it_has_trim_config_options() |
| 22 | + public function test_it_has_hex_config_options() |
25 | 23 | { |
26 | | - $this->assertEquals(Twine\Config\Trim::BOTH, 'trim'); |
27 | | - $this->assertEquals(Twine\Config\Trim::LEFT, 'ltrim'); |
28 | | - $this->assertEquals(Twine\Config\Trim::RIGHT, 'rtrim'); |
| 24 | + $this->assertEquals('encode', Twine\Config\Hex::ENCODE); |
| 25 | + $this->assertEquals('decode', Twine\Config\Hex::DECODE); |
29 | 26 | } |
30 | 27 |
|
31 | | - public function test_it_has_wrap_config_options() |
| 28 | + public function test_it_has_lowercase_config_options() |
32 | 29 | { |
33 | | - $this->assertFalse(Twine\Config\Wrap::SOFT); |
34 | | - $this->assertTrue(Twine\Config\Wrap::HARD); |
| 30 | + $this->assertEquals('strtolower', Twine\Config\Lowercase::ALL); |
| 31 | + $this->assertEquals('lcfirst', Twine\Config\Lowercase::FIRST); |
| 32 | + $this->assertEquals('lcwords', Twine\Config\Lowercase::WORDS); |
| 33 | + } |
| 34 | + |
| 35 | + public function test_it_has_md5_config_options() |
| 36 | + { |
| 37 | + $this->assertFalse(Twine\Config\Md5::DEFAULT); |
| 38 | + $this->assertTrue(Twine\Config\Md5::RAW); |
35 | 39 | } |
36 | 40 |
|
37 | 41 | public function test_it_has_pad_config_options() |
38 | 42 | { |
39 | | - $this->assertEquals(Twine\Config\Pad::RIGHT, STR_PAD_RIGHT); |
40 | | - $this->assertEquals(Twine\Config\Pad::LEFT, STR_PAD_LEFT); |
41 | | - $this->assertEquals(Twine\Config\Pad::BOTH, STR_PAD_BOTH); |
| 43 | + $this->assertEquals(STR_PAD_RIGHT, Twine\Config\Pad::RIGHT); |
| 44 | + $this->assertEquals(STR_PAD_LEFT, Twine\Config\Pad::LEFT); |
| 45 | + $this->assertEquals(STR_PAD_BOTH, Twine\Config\Pad::BOTH); |
42 | 46 | } |
43 | 47 |
|
44 | | - public function test_it_has_base64_config_options() |
| 48 | + public function test_it_has_sha1_config_options() |
45 | 49 | { |
46 | | - $this->assertEquals(Twine\Config\Base64::ENCODE, 'base64_encode'); |
47 | | - $this->assertEquals(Twine\Config\Base64::DECODE, 'base64_decode'); |
| 50 | + $this->assertFalse(Twine\Config\Sha1::DEFAULT); |
| 51 | + $this->assertTrue(Twine\Config\Sha1::RAW); |
48 | 52 | } |
49 | 53 |
|
50 | | - public function test_it_has_equals_config_options() |
| 54 | + public function test_it_has_sha256_config_options() |
51 | 55 | { |
52 | | - $this->assertEquals(Twine\Config\Equals::CASE_SENSITIVE, 'strcmp'); |
53 | | - $this->assertEquals(Twine\Config\Equals::CASE_INSENSITIVE, 'strcasecmp'); |
| 56 | + $this->assertFalse(Twine\Config\Sha256::DEFAULT); |
| 57 | + $this->assertTrue(Twine\Config\Sha256::RAW); |
54 | 58 | } |
55 | 59 |
|
56 | | - public function test_it_has_md5_config_options() |
| 60 | + public function test_it_has_trim_config_options() |
57 | 61 | { |
58 | | - $this->assertFalse(Twine\Config\Md5::DEFAULT); |
59 | | - $this->assertTrue(Twine\Config\Md5::RAW); |
| 62 | + $this->assertEquals('trim', Twine\Config\Trim::BOTH); |
| 63 | + $this->assertEquals('ltrim', Twine\Config\Trim::LEFT); |
| 64 | + $this->assertEquals('rtrim', Twine\Config\Trim::RIGHT); |
60 | 65 | } |
61 | 66 |
|
62 | | - public function test_it_has_sha1_config_options() |
| 67 | + public function test_it_has_uppercase_config_options() |
63 | 68 | { |
64 | | - $this->assertFalse(Twine\Config\Sha1::DEFAULT); |
65 | | - $this->assertTrue(Twine\Config\Sha1::RAW); |
| 69 | + $this->assertEquals('strtoupper', Twine\Config\Uppercase::ALL); |
| 70 | + $this->assertEquals('ucfirst', Twine\Config\Uppercase::FIRST); |
| 71 | + $this->assertEquals('ucwords', Twine\Config\Uppercase::WORDS); |
66 | 72 | } |
67 | 73 |
|
68 | | - public function test_it_has_sha256_config_options() |
| 74 | + public function test_it_has_wrap_config_options() |
69 | 75 | { |
70 | | - $this->assertFalse(Twine\Config\Sha256::DEFAULT); |
71 | | - $this->assertTrue(Twine\Config\Sha256::RAW); |
| 76 | + $this->assertFalse(Twine\Config\Wrap::SOFT); |
| 77 | + $this->assertTrue(Twine\Config\Wrap::HARD); |
72 | 78 | } |
73 | 79 | } |
0 commit comments