public function testReorderParentProxy() { $first = $this->dm->find(null, '/functional/source/first'); $parent = $first->getParentDocument(); $this->dm->reorder($parent, 'first', 'second', false); $this->dm->flush(); $this->assertSame(array('second', 'first', 'third', 'fourth'), $this->getChildrenNames($parent->getChildren())); }
/** * {@inheritDoc} */ public function reorder($parent, $moved, $target, $before) { $parentDocument = $this->dm->find(null, $parent); $this->dm->reorder($parentDocument, basename($moved), basename($target), $before); $this->dm->flush(); }