示例#1
0
 /**
  * @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));
 }
示例#2
0
文件: Object.php 项目: techart/tao
 /**
  * Пытается удалить объект по индексу
  *
  * @param  null|int|string $index
  *
  * @return void
  */
 public function offsetUnset($index)
 {
     parent::offsetUnset($index);
     if (isset($this->fallbak[$index])) {
         unset($this->fallbak[$index]);
     }
 }