/** * @covers Object_AbstractDelegator::offsetExists */ public function testOffsetExists() { $this->object->append('For_Test'); $this->object->append(new stdClass()); $this->assertTrue($this->object->offsetExists(0)); $this->assertTrue($this->object->offsetExists(1)); $this->assertFalse($this->object->offsetExists(2)); $this->object->getIterator(); $this->assertTrue($this->object->offsetExists(0)); $this->assertTrue($this->object->offsetExists(1)); $this->assertFalse($this->object->offsetExists(2)); }
/** * Проверяет существование объекта по индексу * * @param null|int|string $index * * @return boolean */ public function offsetExists($index) { return parent::offsetExists($index) || $this->fallback instanceof self && isset($this->fallback[$index]); }