nur-sery/tests/strTest.php

25 lines
842 B
PHP
Raw Normal View History

2024-06-13 15:11:02 +04:00
<?php
namespace nur\sery;
use nulib\tests\TestCase;
class strTest extends TestCase {
function testCamel2us() {
self::assertSame("a", str::camel2us("a"));
self::assertSame("aa", str::camel2us("aa"));
self::assertSame("aaa", str::camel2us("aaa"));
self::assertSame("a", str::camel2us("A"));
self::assertSame("aa", str::camel2us("Aa"));
self::assertSame("aa", str::camel2us("AA"));
self::assertSame("aaa", str::camel2us("Aaa"));
self::assertSame("aaa", str::camel2us("AAA"));
self::assertSame("a_aa", str::camel2us("AAa"));
self::assertSame("a_b", str::camel2us("aB"));
self::assertSame("aa_bb", str::camel2us("aaBb"));
self::assertSame("aaa_bbb", str::camel2us("aaaBbb"));
self::assertSame("aa_bb", str::camel2us("AaBb"));
self::assertSame("aaa_bbb", str::camel2us("AaaBbb"));
}
}