25 lines
842 B
PHP
25 lines
842 B
PHP
|
<?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"));
|
||
|
}
|
||
|
}
|