PluginProbe ʕ •ᴥ•ʔ
Kubio AI Page Builder / trunk
Kubio AI Page Builder vtrunk
2.9.0 2.8.6 2.8.5 2.8.4 2.8.3 2.8.2 2.8.1 trunk 1.0.0 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.7.0 1.7.1 1.7.2 1.7.3 1.8.0 1.8.1 1.8.2 1.9.0 2.0.0 2.1.1 2.1.2 2.1.3 2.2.0 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.4.3 2.4.5 2.5.0 2.5.1 2.5.2 2.5.3 2.6.0 2.6.1 2.6.2 2.6.3 2.6.5 2.6.6 2.6.7 2.7.0 2.7.1 2.7.2 2.7.3 2.8.0
kubio / vendor / pragmarx / ia-str / stubs / tests / StrTest.php
kubio / vendor / pragmarx / ia-str / stubs / tests Last commit date
CollectionTest.php 4 years ago StrTest.php 4 years ago bootstrap.php 4 years ago
StrTest.php
56 lines
1 <?php
2
3 namespace Illuminate\Tests;
4
5 use PHPUnit\Framework\TestCase;
6 use Illuminate\Support\Str;
7
8 class StrTest extends TestCase
9 {
10 public function testPluralizer()
11 {
12 $this->assertEquals('houses', Str::plural('house'));
13
14 $this->assertEquals('bison', Str::plural('bison'));
15
16 $this->assertEquals('people', Str::plural('people'));
17
18 $this->assertEquals('feet', Str::plural('foot'));
19
20 $this->assertEquals('foot', Str::singular('feet'));
21 }
22
23 public function testStart()
24 {
25 $this->assertEquals('what house', Str::start('house', 'what '));
26 }
27
28 public function testCache()
29 {
30 $this->assertEquals('my_house', Str::snake('my house'));
31 $this->assertEquals('my_house', Str::snake('my house'));
32
33 $this->assertEquals('MyHouse', Str::studly('my house'));
34 $this->assertEquals('MyHouse', Str::studly('my house'));
35
36 $this->assertEquals('myHouse', Str::camel('my house'));
37 $this->assertEquals('myHouse', Str::camel('my house'));
38 }
39
40 public function testLength()
41 {
42 $this->assertEquals(8, Str::length('my house'));
43 $this->assertEquals(8, Str::length('my house', 'UTF-8'));
44 }
45
46 public function testLimit()
47 {
48 $this->assertEquals('my house', Str::limit('my house'));
49 }
50
51 public function testIs()
52 {
53 $this->assertFalse(Str::is([], 'pattern'));
54 }
55 }
56