28 require_once (
'../../../tests/fossologyTestCase.php');
29 require_once (
'../../../tests/TestEnvironment.php');
43 print
"starting setUp Foldertest\n";
49 $this->mybrowser->get($URL);
50 $page = $this->mybrowser->clickLink(
'Move');
51 $FolderId = $this->
getFolderId(
'Basic-Testing', $page,
'oldfolderid');
54 $this->fail(
"MoveFolderTest will fail, no Testing folder to use.\n Please correct and rerun\n");
57 $this->moveFolder =
"MoveTest-$pid";
62 $this->folder2Move =
"MoveMe-$pid";
63 $this->
createFolder(
'Basic-Testing', $this->folder2Move);
77 print
"starting MoveFoldertest\n";
78 $loggedIn = $this->mybrowser->get($URL);
79 $this->assertTrue($this->myassertText($loggedIn,
'/Organize/'),
80 "FAIL! Could not find Organize menu\n");
81 $this->assertTrue($this->myassertText($loggedIn,
'/Folders /'));
82 $this->assertTrue($this->myassertText($loggedIn,
'/Move/'));
83 $this->
mvFolder($this->folder2Move, $this->moveFolder);
87 $page = $this->mybrowser->clickLink(
'Browse');
88 $this->assertTrue($this->myassertText($page,
"/$this->folder2Move/"),
89 "MoveFolderTest FAILED! Folder $this->folder2Move no longer exists!\n");
101 $page = $this->mybrowser->get(
"$URL?mod=admin_folder_delete");
102 $this->assertTrue($this->myassertText($page,
'/Delete Folder/'));
103 $FolderId = $this->
getFolderId($this->moveFolder, $page,
'folder');
104 $this->assertTrue($this->mybrowser->setField(
'folder', $FolderId));
105 $page = $this->mybrowser->clickSubmit(
'Delete!');
106 $this->assertTrue($page);
107 $this->assertTrue($this->myassertText($page,
"/Deletion of folder $this->moveFolder/"),
108 "MoveFoldeTest tearDown FAILED! Phrase 'Deletion of $this->moveFolder' not found\n");
createFolder($parent=null, $name, $description=null)
getFolderId($folderName, $page, $selectName)
mvFolder($folder, $destination)
Login($User=NULL, $Password=NULL)