27 require_once(
'../../../tests/fossologyTestCase.php');
28 require_once(
'../../../tests/commonTestFuncs.php');
29 require_once(
'../../../tests/TestEnvironment.php');
30 require_once(
'../../../tests/testClasses/parseBrowseMenu.php');
31 require_once(
'../../../tests/testClasses/parseMiniMenu.php');
32 require_once(
'../../../tests/testClasses/parseFolderPath.php');
33 require_once(
'../../../tests/testClasses/parseLicenseTbl.php');
57 $name =
'foss23D1F1L.tar.bz2';
58 $safeName = escapeDots($name);
59 $this->host = getHost($URL);
63 $page = $this->mybrowser->get($URL);
64 $page = $this->mybrowser->clickLink(
'Browse');
65 $this->assertTrue($this->myassertText($page,
'/Browse/'),
66 "verify23D1F1L FAILED! Could not find Browse menu\n");
67 $page = $this->mybrowser->clickLink(
'Testing');
68 $this->assertTrue($this->myassertText($page,
'/Testing/'),
69 "verify23D1F1L FAILED! Could not find Testing folder\n");
70 $result = $this->myassertText($page,
"/$name/");
71 if(!($result)) { exit(FALSE); }
74 function testVerifyFossology()
80 print
"starting VerifyFoss23D1F1L test\n";
81 $page = $this->mybrowser->clickLink(
'Browse');
82 $this->assertTrue($this->myassertText($page,
'/Browse/'),
83 "verify23D1F1L FAILED! Could not find Browse menu\n");
84 $page = $this->mybrowser->clickLink(
'Testing');
86 $this->assertTrue($this->myassertText($page,
"/Browse/"),
87 "verify23D1F1L FAILED! Browse Title not found\n");
88 $this->assertTrue($this->myassertText($page,
"/$safeName/"),
89 "verify23D1F1L FAILED! did not find $name\n");
90 $this->assertTrue($this->myassertText($page,
"/>View</"),
91 "verifyfoss23D1F1L FAILED! >View< not found\n");
92 $this->assertTrue($this->myassertText($page,
"/>Meta</"),
93 "verifyFoss23D1F1L FAILED! >Meta< not found\n");
94 $this->assertTrue($this->myassertText($page,
"/>Download</"),
95 "verifyFoss23D1F1L FAILED! >Download< not found\n");
98 $page = $this->mybrowser->clickLink($name);
100 $this->assertTrue($this->myassertText($page,
"/foss23Dirs1File1Lic\//"),
101 "verifyfoss23D1F1L FAILED! 'foss23Dirs1File1Lic/' not found\n");
102 $this->assertTrue($this->myassertText($page,
"/1 item/"),
103 "verifyfoss23D1F1L FAILED! '1 item' not found\n");
106 $page = $this->mybrowser->clickLink(
'foss23Dirs1File1Lic/');
109 $this->assertTrue($this->myassertText($page,
"/9 items/"),
110 "verifyfoss23D1F1L FAILED! '9 items' not found\n");
111 $this->assertTrue($this->myassertText($page,
"/agents/"),
112 "verify23D1F1L FAILED! did not find 'agents' directory\n");
113 $this->assertTrue($this->myassertText($page,
"/scheduler/"),
114 "verify23D1F1L FAILED! did not find scheduler directory\n");
119 $miniMenu = $mini->parseMiniMenu();
120 $url = makeUrl($this->host, $miniMenu[
'License']);
121 if($url === NULL) { $this->fail(
"verify23D1F1L Failed, host is not set"); }
123 $page = $this->mybrowser->get($url);
125 $this->assertTrue($this->myassertText($page,
'/License Browser/'),
126 "verify23D1F1L FAILED! License Browser Title not found\n");
127 $this->assertTrue($this->myassertText($page,
'/Total licenses: 2/'),
128 "verify23D1F1L FAILED! Total Licenses does not equal 2\n");
132 $licTable = $licTbl->parseLicenseTbl();
136 $gplv2URL = makeUrl($this->host, $licTable[
'\'GPL v2\
'-style']);
137 $page = $this->mybrowser->get($gplv2URL);
139 $tblList = $licFileList->parseFolderPath();
140 $tableCnt = count($tblList);
141 print
"Checking the number of files based on 'GPL v2'-style\n";
142 $this->assertEqual($tableCnt, 1);
Login($User=NULL, $Password=NULL)