/** * @dataProvider simpleArrayProvider */ public function testDiffWith(array $array) { $secondArray = ['one' => 1, 1 => 'one', 2 => 2]; $arrayDiff = array_diff($array, $secondArray); $ma = new MutableArray($array); $copiedMa = $ma->diffWith($secondArray); $this->assertTrue($copiedMa === $ma); $this->assertTrue($arrayDiff === $ma->toArray()); }
/** * @dataProvider simpleArrayProvider * * @param array $array */ public function testDiffWith(array $array) { $secondArray = ['one' => 1, 1 => 'one', 2 => 2]; $arrayzy = new A($array); $resultArrayzy = $arrayzy->diffWith($secondArray); $resultArray = array_diff($array, $secondArray); $this->assertMutable($arrayzy, $resultArrayzy, $resultArray); }