FOSSology  4.4.0
Open Source License Compliance by Open Source Software
OrgFoldersMenuTest-Delete.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2008 Hewlett-Packard Development Company, L.P.
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
7 
16 require_once ('../../../tests/fossologyTestCase.php');
17 require_once ('../../../tests/TestEnvironment.php');
18 
19 global $URL;
20 global $USER;
21 global $PASSWORD;
22 
24 {
25  public $mybrowser;
26 
27  function testFolderDeleteMenu() {
28 
29  global $URL;
30 
31  $this->Login();
32  /* we get the home page to get rid of the user logged in page */
33  $loggedIn = $this->mybrowser->get($URL);
34  $this->assertTrue($this->myassertText($loggedIn, '/Organize/'));
35  $this->assertTrue($this->myassertText($loggedIn, '/Folders /'));
36  $this->assertTrue($this->myassertText($loggedIn, '/Create/'));
37  /* ok, this proves the text is on the page, let's see if we can
38  * get to the delete page.
39  */
40  $page = $this->mybrowser->get("$URL?mod=admin_folder_delete");
41  $this->assertTrue($this->myassertText($page, '/Delete Folder/'));
42  $this->assertTrue($this->myassertText($page, '/THERE IS NO UNDELETE/'));
43  }
44 }
Login($User=NULL, $Password=NULL)