user = Helper::makeUser('user.' . randomString(10), 'forum'); } public function tearDown(): void { $this->user->remove(); } public function testNavigationBasic(): void { $manager = new Manager\UserNavigation(); $this->assertNull($manager->findById(0), 'user-nav-find-by-id'); global $Cache; $Cache->delete_value(Manager\UserNavigation::LIST_KEY); $fullList = $manager->fullList(); $this->assertCount(12, $fullList, 'user-nav-manager-full'); $this->assertTrue( $this->user->setField('nav_list', [$fullList[3]["id"], $fullList[2]["id"], $fullList[1]["id"]])->modify(), 'user-nav-modify' ); $userList = $manager->userControlList($this->user); $this->assertCount(3, $userList, 'user-nav-count'); $this->assertEquals($fullList[2]["id"], $userList[1]["id"], 'user-nav-order'); } }