/** * format() should return string if format is html */ public function testFormat_returnsString_ifFormatIsText() { $symbol = new Underscore(); $expected = '-'; $actual = $symbol->format('text'); $this->assertEquals($expected, $actual); return; }
/** * Get a method name by its alias * * @param string $method The method * * @return string The real method name */ public static function getAliasOf($method) { return Underscore::option('aliases.' . $method); }
public function getInstance() { if (!isset(self::$_instance)) { $c = __CLASS__; self::$_instance = new $c(); } return self::$_instance; }
public function testAppend() { $array = [1, 2, 3]; $newArray = Underscore::append($array, 4); $this->assertEquals([1, 2, 3, 4], $newArray); }