public function testSplitOnCamelCase() { $expectations = [["camelWord", "camel Word"], ["camelWordX", "camel Word X"], ["userID", "user ID"], ["userID Second", "user ID Second"], ["ABCd", "AB Cd"]]; foreach ($expectations as $expect) { $this->assertEquals($expect[1], \Packaged\Helpers\Strings::splitOnCamelCase($expect[0])); } }
public static function getValue($key) { $key = 'static::' . $key; if (defined($key)) { $value = constant($key); return Strings::splitOnCamelCase($value); } else { return null; } }