Esempio n. 1
0
 /** @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)));
 }
Esempio n. 2
0
 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)));
 }