public function testCount() { $arr = new ArrayObject(['these', 'are', 'my', 'items']); $this->assertEquals(4, $arr->count()); $this->assertEquals(4, count($arr)); $arr->merge('a', 'b'); $this->assertEquals(6, $arr->count()); }
/** * Returns the number of segments in this path. * * @return int */ public function segmentCount() { return $this->segments->count(); }