Passed
Push — master ( 7d2fba...2be253 )
by Jean Paul
01:17
created

TextUtilsTest::testConvertToPascalCase()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 8
rs 10
1
<?php declare( strict_types = 1 );
2
3
namespace Coco\SourceWatcher\Tests\Utils;
4
5
use Coco\SourceWatcher\Utils\TextUtils;
6
use PHPUnit\Framework\TestCase;
7
8
/**
9
 * Class TextUtilsTest
10
 * @package Coco\SourceWatcher\Tests\Utils
11
 */
12
class TextUtilsTest extends TestCase
13
{
14
    /**
15
     *
16
     */
17
    public function testConvertToCamelCase () : void
18
    {
19
        $textUtils = new TextUtils();
20
21
        $given = "this_is_a_text";
22
        $expected = "thisIsAText";
23
24
        $this->assertEquals( $expected, $textUtils->textToCamelCase( $given ) );
25
    }
26
27
    /**
28
     *
29
     */
30
    public function testConvertToPascalCase () : void
31
    {
32
        $textUtils = new TextUtils();
33
34
        $given = "this_is_a_text";
35
        $expected = "ThisIsAText";
36
37
        $this->assertEquals( $expected, $textUtils->textToPascalCase( $given ) );
38
    }
39
}
40