Skip to content

Commit be6e7e8

Browse files
committed
IHF: str_lower tests added.
1 parent 79bc121 commit be6e7e8

File tree

2 files changed

+52
-10
lines changed

2 files changed

+52
-10
lines changed

tests/ExampleTest.php

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/StrLowerTest.php

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

0 commit comments

Comments
 (0)