Skip to content

Commit

Permalink
IHF: str_upper tests added.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-ivanov committed Sep 14, 2016
1 parent be6e7e8 commit c97d4e7
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/StrLowerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function it_lowers_mixed_word()
}

/** @test */
public function it_lowers_uppercase_word()
public function it_lowers_uppercased_word()
{
$this->assertEquals('test', str_lower('TEST'));
}
Expand All @@ -39,7 +39,7 @@ public function it_lowers_mixed_sentence()
}

/** @test */
public function it_lowers_uppercase_sentence()
public function it_lowers_uppercased_sentence()
{
$this->assertEquals('another test', str_lower('ANOTHER TEST'));
}
Expand Down
52 changes: 52 additions & 0 deletions tests/StrUpperTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php

class StrUpperTest extends TestCase
{
/** @test */
public function it_works_with_an_empty_string()
{
$this->assertEquals('', str_upper(''));
}

/** @test */
public function it_uppers_capitalized_word()
{
$this->assertEquals('TEST', str_upper('Test'));
}

/** @test */
public function it_uppers_mixed_word()
{
$this->assertEquals('TEST', str_upper('TeSt'));
}

/** @test */
public function it_uppers_lowercased_word()
{
$this->assertEquals('TEST', str_upper('test'));
}

/** @test */
public function it_uppers_capitalized_sentence()
{
$this->assertEquals('ANOTHER TEST', str_upper('Another Test'));
}

/** @test */
public function it_uppers_mixed_sentence()
{
$this->assertEquals('ANOTHER TEST', str_upper('AnoTHer TeST'));
}

/** @test */
public function it_uppers_lowercased_sentence()
{
$this->assertEquals('ANOTHER TEST', str_upper('another test'));
}

/** @test */
public function it_uppers_mixed_sentence_with_special_chars()
{
$this->assertEquals('ANOTHER-TEST!', str_upper('AnoTHer-TeST!'));
}
}

0 comments on commit c97d4e7

Please sign in to comment.