17 require_once (
'../../../tests/fossologyTestCase.php');
18 require_once (
'../../../tests/TestEnvironment.php');
35 function testCreateFolder()
39 print
"starting DupFoldertest\n";
41 for ($i = 0; $i < 2; $i++)
43 $this->mybrowser->get($URL);
44 $page = $this->mybrowser->clickLink(
'Create');
45 $this->assertTrue($this->myassertText($page,
'/Create a new Fossology folder/'));
47 $this->assertTrue($this->mybrowser->setField(
'parentid', 1));
51 $this->assertTrue($this->mybrowser->setField(
'newname', $this->folder_name));
52 $desc =
'Folder created by DupFolderTest as subfolder of RootFolder';
53 $this->assertTrue($this->mybrowser->setField(
'description',
"$desc"));
54 $page = $this->mybrowser->clickSubmit(
'Create!');
55 $this->assertTrue($page);
59 $this->assertFalse($this->myassertText($page,
"/Folder $this->folder_name Created/"),
60 "FAIL! Folder $this->folder_name Created Was seen,\n");
64 $this->assertTrue($this->myassertText($page,
"/Folder $this->folder_name Created/"),
65 "FAIL! Folder $this->folder_name Created not found\n");
74 $page = $this->mybrowser->get(
"$URL?mod=admin_folder_delete");
75 $this->assertTrue($this->myassertText($page,
'/Delete Folder/'));
77 $this->assertTrue($this->mybrowser->setField(
'folder', $FolderId));
78 $page = $this->mybrowser->clickSubmit(
'Delete!');
79 $this->assertTrue($page);
80 $this->assertTrue($this->myassertText($page,
"/Deletion of folder $this->folder_name/"),
81 "DupFoldeTest tearDown FAILED! Deletion of $this->folder_name not found\n");
getFolderId($folderName, $page, $selectName)
Login($User=NULL, $Password=NULL)