| 12345678910111213141516171819202122232425 |
- <?php
- namespace App\Tests\Service\Utils;
- use App\Service\Utils\StringsUtils;
- use PHPUnit\Framework\TestCase;
- class StringsUtilsTest extends TestCase
- {
- /**
- * @see StringsUtils::unquote()
- */
- public function testUnquote():void
- {
- $this->assertEquals("foo", StringsUtils::unquote("'foo"));
- }
- /**
- * @see StringsUtils::camelToSnake()
- */
- public function testCamelToSnake(): void {
- $this->assertEquals("foo_bar", StringsUtils::camelToSnake("FooBar"));
- $this->assertEquals("foo-bar", StringsUtils::camelToSnake("FooBar", '-'));
- $this->assertEquals("foo_bar", StringsUtils::camelToSnake("fooBar"));
- }
- }
|