-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1710dcd
commit eb872fb
Showing
29 changed files
with
680 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,8 @@ | |
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Tale\\": "src" | ||
"Tale\\": "src", | ||
"Tale\\Test\\": "tests" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Tale\Test\Inflector\Strategy; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Tale\Inflector\Strategy\CamelCaseStrategy; | ||
|
||
/** | ||
* @coversDefaultClass \Tale\Inflector\Strategy\CamelCaseStrategy | ||
*/ | ||
class CamelCaseStrategyTest extends TestCase | ||
{ | ||
/** | ||
* @covers \Tale\Inflector\Strategy\RejoinStrategy::inflect | ||
* @covers ::inflect | ||
*/ | ||
public function testInflections() | ||
{ | ||
$instance = new CamelCaseStrategy(); | ||
$this->assertEquals('SomeRandomString', $instance->inflect('--some Random&string!')); | ||
$this->assertEquals('IRandomString', $instance->inflect('IRandomSTRING')); | ||
$this->assertEquals('SomeStringOfStrings', $instance->inflect('SomeSTRINGOfStrings')); | ||
$this->assertEquals('StringString', $instance->inflect('String! & ! String')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Tale\Test\Inflector\Strategy; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Tale\Inflector\Strategy\DashStrategy; | ||
|
||
/** | ||
* @coversDefaultClass \Tale\Inflector\Strategy\DashStrategyTest | ||
*/ | ||
class DashStrategyTest extends TestCase | ||
{ | ||
/** | ||
* @covers \Tale\Inflector\Strategy\RejoinStrategy::inflect | ||
*/ | ||
public function testInflections() | ||
{ | ||
$instance = new DashStrategy(); | ||
$this->assertEquals('some-Random-string', $instance->inflect('--some Random&string!')); | ||
$this->assertEquals('I-Random-STRING', $instance->inflect('IRandomSTRING')); | ||
$this->assertEquals('Some-STRING-Of-Strings', $instance->inflect('SomeSTRINGOfStrings')); | ||
$this->assertEquals('String-String', $instance->inflect('String! & ! String')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Tale\Test\Inflector\Strategy; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Tale\Inflector\Strategy\KebabCaseStrategy; | ||
|
||
/** | ||
* @coversDefaultClass \Tale\Inflector\Strategy\KebabCaseStrategy | ||
*/ | ||
class KebabCaseStrategyTest extends TestCase | ||
{ | ||
/** | ||
* @covers \Tale\Inflector\Strategy\RejoinStrategy::inflect | ||
* @covers ::inflect | ||
*/ | ||
public function testInflections() | ||
{ | ||
$instance = new KebabCaseStrategy(); | ||
$this->assertEquals('some-random-string', $instance->inflect('--some Random&string!')); | ||
$this->assertEquals('i-random-string', $instance->inflect('IRandomSTRING')); | ||
$this->assertEquals('some-string-of-strings', $instance->inflect('SomeSTRINGOfStrings')); | ||
$this->assertEquals('string-string', $instance->inflect('String! & ! String')); | ||
} | ||
} |
Oops, something went wrong.