16 require_once(
'../../../tests/fossologyTestCase.php');
17 require_once(
'../../../tests/commonTestFuncs.php');
18 require_once(
'../../../tests/TestEnvironment.php');
19 require_once(
'../../../tests/testClasses/parseBrowseMenu.php');
20 require_once(
'../../../tests/testClasses/parseMiniMenu.php');
21 require_once(
'../../../tests/testClasses/parseFolderPath.php');
22 require_once(
'../../../tests/testClasses/parseLicenseTbl.php');
46 $name =
'foss23D1F1L.tar.bz2';
47 $safeName = escapeDots($name);
48 $this->host = getHost($URL);
52 $page = $this->mybrowser->get($URL);
53 $page = $this->mybrowser->clickLink(
'Browse');
54 $this->assertTrue($this->myassertText($page,
'/Browse/'),
55 "verify23D1F1L FAILED! Could not find Browse menu\n");
56 $page = $this->mybrowser->clickLink(
'Testing');
57 $this->assertTrue($this->myassertText($page,
'/Testing/'),
58 "verify23D1F1L FAILED! Could not find Testing folder\n");
59 $result = $this->myassertText($page,
"/$name/");
60 if(!($result)) { exit(FALSE); }
63 function testVerifyFossology()
69 print
"starting VerifyFoss23D1F1L test\n";
70 $page = $this->mybrowser->clickLink(
'Browse');
71 $this->assertTrue($this->myassertText($page,
'/Browse/'),
72 "verify23D1F1L FAILED! Could not find Browse menu\n");
73 $page = $this->mybrowser->clickLink(
'Testing');
75 $this->assertTrue($this->myassertText($page,
"/Browse/"),
76 "verify23D1F1L FAILED! Browse Title not found\n");
77 $this->assertTrue($this->myassertText($page,
"/$safeName/"),
78 "verify23D1F1L FAILED! did not find $name\n");
79 $this->assertTrue($this->myassertText($page,
"/>View</"),
80 "verifyfoss23D1F1L FAILED! >View< not found\n");
81 $this->assertTrue($this->myassertText($page,
"/>Meta</"),
82 "verifyFoss23D1F1L FAILED! >Meta< not found\n");
83 $this->assertTrue($this->myassertText($page,
"/>Download</"),
84 "verifyFoss23D1F1L FAILED! >Download< not found\n");
87 $page = $this->mybrowser->clickLink($name);
89 $this->assertTrue($this->myassertText($page,
"/foss23Dirs1File1Lic\//"),
90 "verifyfoss23D1F1L FAILED! 'foss23Dirs1File1Lic/' not found\n");
91 $this->assertTrue($this->myassertText($page,
"/1 item/"),
92 "verifyfoss23D1F1L FAILED! '1 item' not found\n");
95 $page = $this->mybrowser->clickLink(
'foss23Dirs1File1Lic/');
98 $this->assertTrue($this->myassertText($page,
"/9 items/"),
99 "verifyfoss23D1F1L FAILED! '9 items' not found\n");
100 $this->assertTrue($this->myassertText($page,
"/agents/"),
101 "verify23D1F1L FAILED! did not find 'agents' directory\n");
102 $this->assertTrue($this->myassertText($page,
"/scheduler/"),
103 "verify23D1F1L FAILED! did not find scheduler directory\n");
108 $miniMenu = $mini->parseMiniMenu();
109 $url = makeUrl($this->host, $miniMenu[
'License']);
110 if($url === NULL) { $this->fail(
"verify23D1F1L Failed, host is not set"); }
112 $page = $this->mybrowser->get($url);
114 $this->assertTrue($this->myassertText($page,
'/License Browser/'),
115 "verify23D1F1L FAILED! License Browser Title not found\n");
116 $this->assertTrue($this->myassertText($page,
'/Total licenses: 2/'),
117 "verify23D1F1L FAILED! Total Licenses does not equal 2\n");
121 $licTable = $licTbl->parseLicenseTbl();
125 $gplv2URL = makeUrl($this->host, $licTable[
'\'GPL v2\
'-style']);
126 $page = $this->mybrowser->get($gplv2URL);
128 $tblList = $licFileList->parseFolderPath();
129 $tableCnt = count($tblList);
130 print
"Checking the number of files based on 'GPL v2'-style\n";
131 $this->assertEqual($tableCnt, 1);
Login($User=NULL, $Password=NULL)