Skip to content

Commit c97d4e7

Browse files
committed
IHF: str_upper tests added.
1 parent be6e7e8 commit c97d4e7

File tree

2 files changed

+54
-2
lines changed

2 files changed

+54
-2
lines changed

tests/StrLowerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function it_lowers_mixed_word()
2121
}
2222

2323
/** @test */
24-
public function it_lowers_uppercase_word()
24+
public function it_lowers_uppercased_word()
2525
{
2626
$this->assertEquals('test', str_lower('TEST'));
2727
}
@@ -39,7 +39,7 @@ public function it_lowers_mixed_sentence()
3939
}
4040

4141
/** @test */
42-
public function it_lowers_uppercase_sentence()
42+
public function it_lowers_uppercased_sentence()
4343
{
4444
$this->assertEquals('another test', str_lower('ANOTHER TEST'));
4545
}

tests/StrUpperTest.php

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?php
2+
3+
class StrUpperTest extends TestCase
4+
{
5+
/** @test */
6+
public function it_works_with_an_empty_string()
7+
{
8+
$this->assertEquals('', str_upper(''));
9+
}
10+
11+
/** @test */
12+
public function it_uppers_capitalized_word()
13+
{
14+
$this->assertEquals('TEST', str_upper('Test'));
15+
}
16+
17+
/** @test */
18+
public function it_uppers_mixed_word()
19+
{
20+
$this->assertEquals('TEST', str_upper('TeSt'));
21+
}
22+
23+
/** @test */
24+
public function it_uppers_lowercased_word()
25+
{
26+
$this->assertEquals('TEST', str_upper('test'));
27+
}
28+
29+
/** @test */
30+
public function it_uppers_capitalized_sentence()
31+
{
32+
$this->assertEquals('ANOTHER TEST', str_upper('Another Test'));
33+
}
34+
35+
/** @test */
36+
public function it_uppers_mixed_sentence()
37+
{
38+
$this->assertEquals('ANOTHER TEST', str_upper('AnoTHer TeST'));
39+
}
40+
41+
/** @test */
42+
public function it_uppers_lowercased_sentence()
43+
{
44+
$this->assertEquals('ANOTHER TEST', str_upper('another test'));
45+
}
46+
47+
/** @test */
48+
public function it_uppers_mixed_sentence_with_special_chars()
49+
{
50+
$this->assertEquals('ANOTHER-TEST!', str_upper('AnoTHer-TeST!'));
51+
}
52+
}

0 commit comments

Comments
 (0)