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

TextUtilsTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 26
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testConvertToPascalCase() 0 8 1
A testConvertToCamelCase() 0 8 1
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