Пример #1
0
 /**
  * @dataProvider simpleArrayProvider
  */
 public function testOffsetUnset(array $array)
 {
     $ma = new MutableArray($array);
     $offset = 1;
     unset($array[$offset]);
     $ma->offsetUnset($offset);
     $this->assertTrue($array === $ma->toArray());
     $this->assertFalse(isset($array[$offset]));
     $this->assertFalse($ma->offsetExists($offset));
 }
Пример #2
0
 /**
  * @dataProvider simpleArrayProvider
  *
  * @param array $array
  */
 public function testOffsetUnset(array $array)
 {
     $arrayzy = new A($array);
     $offset = 1;
     $arrayzy->offsetUnset($offset);
     unset($array[$offset]);
     $this->assertSame($array, $arrayzy->toArray());
     $this->assertFalse(isset($array[$offset]));
     $this->assertFalse($arrayzy->offsetExists($offset));
 }