17 require_once (
'../../../tests/fossologyTestCase.php');
18 require_once (
'../../../tests/TestEnvironment.php');
32 print
"starting setUp Foldertest\n";
38 $this->mybrowser->get($URL);
39 $page = $this->mybrowser->clickLink(
'Move');
40 $FolderId = $this->
getFolderId(
'Basic-Testing', $page,
'oldfolderid');
43 $this->fail(
"MoveFolderTest will fail, no Testing folder to use.\n Please correct and rerun\n");
46 $this->moveFolder =
"MoveTest-$pid";
51 $this->folder2Move =
"MoveMe-$pid";
52 $this->
createFolder(
'Basic-Testing', $this->folder2Move);
66 print
"starting MoveFoldertest\n";
67 $loggedIn = $this->mybrowser->get($URL);
68 $this->assertTrue($this->myassertText($loggedIn,
'/Organize/'),
69 "FAIL! Could not find Organize menu\n");
70 $this->assertTrue($this->myassertText($loggedIn,
'/Folders /'));
71 $this->assertTrue($this->myassertText($loggedIn,
'/Move/'));
72 $this->
mvFolder($this->folder2Move, $this->moveFolder);
76 $page = $this->mybrowser->clickLink(
'Browse');
77 $this->assertTrue($this->myassertText($page,
"/$this->folder2Move/"),
78 "MoveFolderTest FAILED! Folder $this->folder2Move no longer exists!\n");
90 $page = $this->mybrowser->get(
"$URL?mod=admin_folder_delete");
91 $this->assertTrue($this->myassertText($page,
'/Delete Folder/'));
92 $FolderId = $this->
getFolderId($this->moveFolder, $page,
'folder');
93 $this->assertTrue($this->mybrowser->setField(
'folder', $FolderId));
94 $page = $this->mybrowser->clickSubmit(
'Delete!');
95 $this->assertTrue($page);
96 $this->assertTrue($this->myassertText($page,
"/Deletion of folder $this->moveFolder/"),
97 "MoveFoldeTest tearDown FAILED! Phrase 'Deletion of $this->moveFolder' not found\n");
mvFolder($folder, $destination)
createFolder($parent, $name, $description=null)
getFolderId($folderName, $page, $selectName)
Login($User=NULL, $Password=NULL)