forked from laravel/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSupportPluralizerTest.php
More file actions
executable file
·32 lines (28 loc) · 1.16 KB
/
SupportPluralizerTest.php
File metadata and controls
executable file
·32 lines (28 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
class SupportPluralizerTest extends PHPUnit_Framework_TestCase {
public function testBasicUsage()
{
$this->assertEquals('children', str_plural('child'));
$this->assertEquals('tests', str_plural('test'));
$this->assertEquals('deer', str_plural('deer'));
$this->assertEquals('child', str_singular('children'));
$this->assertEquals('test', str_singular('tests'));
$this->assertEquals('deer', str_singular('deer'));
}
public function testCaseSensitiveUsage()
{
$this->assertEquals('Children', str_plural('Child'));
$this->assertEquals('CHILDREN', str_plural('CHILD'));
$this->assertEquals('Tests', str_plural('Test'));
$this->assertEquals('TESTS', str_plural('TEST'));
$this->assertEquals('tests', str_plural('test'));
$this->assertEquals('Deer', str_plural('Deer'));
$this->assertEquals('DEER', str_plural('DEER'));
$this->assertEquals('Child', str_singular('Children'));
$this->assertEquals('CHILD', str_singular('CHILDREN'));
$this->assertEquals('Test', str_singular('Tests'));
$this->assertEquals('TEST', str_singular('TESTS'));
$this->assertEquals('Deer', str_singular('Deer'));
$this->assertEquals('DEER', str_singular('DEER'));
}
}