getClassName() public static method

Get class name without namespace
public static getClassName ( mixed $object, boolean $toLower = false ) : mixed | string
$object mixed
$toLower boolean
return mixed | string
Ejemplo n.º 1
0
 public function testGetClassName()
 {
     isSame('JBZoo', Str::getClassName('JBZoo'));
     isSame('JBZoo', Str::getClassName('\\JBZoo'));
     isSame('CCK', Str::getClassName('\\JBZoo\\CCK'));
     isSame('Element', Str::getClassName('\\JBZoo\\CCK\\Element'));
     isSame('Repeatable', Str::getClassName('\\JBZoo\\CCK\\Element\\Repeatable'));
     isSame('StringTest', Str::getClassName($this));
     isSame('StringTest', Str::getClassName($this, false));
     isSame('StringTest', Str::getClassName($this, false));
     isSame('phpunit', Str::getClassName(__NAMESPACE__, true));
 }