TODO: Move this logic to the DocumentManager
{@inheritdoc}
public orderAt ( $uuid, $position, $userId, $webspaceKey, $locale ) |
public function testOrderAtToLast() { $data = $this->prepareOrderAtData(); $result = $this->mapper->orderAt($data[2]->getUuid(), 4, 1, 'sulu_io', 'en'); $this->assertEquals($data[2]->getUuid(), $result->getUuid()); $this->assertEquals('/page-1/page-1-2', $result->getPath()); $this->assertEquals(1, $result->getChanger()); $result = $this->mapper->loadByParent($data[0]->getUuid(), 'sulu_io', 'en'); $this->assertEquals('/page-1/page-1-1', $result[0]->getPath()); $this->assertEquals('/page-1/page-1-3', $result[1]->getPath()); $this->assertEquals('/page-1/page-1-4', $result[2]->getPath()); $this->assertEquals('/page-1/page-1-2', $result[3]->getPath()); }