28 require_once (
'../../../tests/fossologyTestCase.php');
29 require_once (
'../../../tests/TestEnvironment.php');
46 function testCreateFolder()
50 print
"starting DupFoldertest\n";
52 for ($i = 0; $i < 2; $i++)
54 $this->mybrowser->get($URL);
55 $page = $this->mybrowser->clickLink(
'Create');
56 $this->assertTrue($this->myassertText($page,
'/Create a new Fossology folder/'));
58 $this->assertTrue($this->mybrowser->setField(
'parentid', 1));
62 $this->assertTrue($this->mybrowser->setField(
'newname', $this->folder_name));
63 $desc =
'Folder created by DupFolderTest as subfolder of RootFolder';
64 $this->assertTrue($this->mybrowser->setField(
'description',
"$desc"));
65 $page = $this->mybrowser->clickSubmit(
'Create!');
66 $this->assertTrue($page);
70 $this->assertFalse($this->myassertText($page,
"/Folder $this->folder_name Created/"),
71 "FAIL! Folder $this->folder_name Created Was seen,\n");
75 $this->assertTrue($this->myassertText($page,
"/Folder $this->folder_name Created/"),
76 "FAIL! Folder $this->folder_name Created not found\n");
85 $page = $this->mybrowser->get(
"$URL?mod=admin_folder_delete");
86 $this->assertTrue($this->myassertText($page,
'/Delete Folder/'));
88 $this->assertTrue($this->mybrowser->setField(
'folder', $FolderId));
89 $page = $this->mybrowser->clickSubmit(
'Delete!');
90 $this->assertTrue($page);
91 $this->assertTrue($this->myassertText($page,
"/Deletion of folder $this->folder_name/"),
92 "DupFoldeTest tearDown FAILED! Deletion of $this->folder_name not found\n");
getFolderId($folderName, $page, $selectName)
Login($User=NULL, $Password=NULL)