Toying with unit tests
Just a start, better than nothing
This commit is contained in:
parent
c27fbf8694
commit
f3ee33e933
1 changed files with 17 additions and 0 deletions
17
tests/classes/StringTest.php
Normal file
17
tests/classes/StringTest.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
require_once 'classes/String.php';
|
||||
|
||||
class StringTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testUpperWords()
|
||||
{
|
||||
$this->assertEquals(String::upperWords('foo@bar.com'), 'foo@bar.com');
|
||||
$this->assertEquals(String::upperWords('FOO@BAR.COM'), 'FOO@BAR.COM');
|
||||
$this->assertEquals(String::upperWords('foo bar'), 'Foo Bar');
|
||||
$this->assertEquals(String::upperWords('FOO BAR'), 'Foo Bar');
|
||||
$this->assertEquals(String::upperWords('fOO bAR'), 'Foo Bar');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue