public function testUniqueId() { // docs $this->assertEquals(0, __::uniqueId()); $this->assertEquals('stooge_1', __::uniqueId('stooge_')); $this->assertEquals(2, __::uniqueId()); // from js $ids = array(); $i = 0; while ($i++ < 100) { array_push($ids, __::uniqueId()); } $this->assertEquals(count($ids), count(__::uniq($ids))); // extra $this->assertEquals('stooges', join('', __::first(__::uniqueId('stooges'), 7)), 'prefix assignment works'); }