/** * @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)); }
/** * @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)); }