public function testAllShouldDoNothingWithNotExistingDocuments() { $group = new AbstractGroup('Model\\Comment'); $group->forSaved = array('foo', 'bar'); $group->remove(array('ups')); $this->assertSame(array('foo', 'bar'), $group->all()); }
public function testAll() { $group = new AbstractGroup('Model\\Comment'); $group->forSaved = array('foo', 'bar', 'foobar', 'barfoo'); $group->add(array('ups', 'spu')); $group->remove(array('bar', 'spu')); $this->assertSame(array('foo', 'foobar', 'barfoo', 'ups'), $group->all()); }