/** @dataProvider unaffectedSnapshotComputerProvider */ public function testUnaffectedCollections(AbstractSnapshot $origin, AbstractSnapshot $upstream) { $set = new Set(); $set->compute($origin, $upstream); $this->assertNotContainsOnly('integer', array_keys(iterator_to_array($set))); }
public function testComputeCollections() { $old = $new = [['foo' => 'bar', 'baz' => 'fubar'], ['foo' => 'baz', 'baz' => 'fubar']]; $new[0]['baz'] = 'fubaz'; $old = new CollectionSnapshot($old, '[foo]'); $new = new CollectionSnapshot($new, '[foo]'); $set = new Set(); $set->compute($old, $new); $this->assertContainsOnly('integer', array_keys(iterator_to_array($set))); }