public function testNew() { $ar = new CharArray(16); $this->assertEquals(16, $ar->getSize()); $this->assertEquals(16, $ar->length()); }
/** * Returns the current capacity. The capacity is the amount of storage * available for newly inserted characters, beyond which an allocation * will occur. * * @return int * the current capacity */ public function capacity() { return $this->value->getSize(); }