orderBefore() public method

public orderBefore ( $uuid, $beforeUuid, $userId, $webspaceKey, $locale )
示例#1
0
 public function testOrderBefore()
 {
     $data = $this->prepareCopyMoveTestData();
     $result = $this->mapper->orderBefore($data[6]->getUuid(), $data[4]->getUuid(), 4, 'sulu_io', 'en');
     $this->assertEquals($data[6]->getUuid(), $result->getUuid());
     $this->assertEquals('/page-2/subpage', $result->getPath());
     $this->assertEquals(4, $result->getChanger());
     $result = $this->mapper->loadByParent($data[3]->getUuid(), 'sulu_io', 'en');
     $this->assertEquals('/page-2/subpage', $result[0]->getPath());
     $this->assertEquals('/page-2/sub', $result[1]->getPath());
     $this->assertEquals('/page-2/sub-1', $result[2]->getPath());
 }