17 require_once(
'../fossologyTestCase.php');
18 require_once(
'../commonTestFuncs.php');
19 require_once(
'../TestEnvironment.php');
20 require_once(
'../testClasses/parseBrowseMenu.php');
21 require_once(
'../testClasses/parseMiniMenu.php');
22 require_once(
'../testClasses/parseFolderPath.php');
23 require_once(
'../testClasses/dom-parseLicenseTable.php');
24 require_once(
'../copyright/libCopyRight.php');
46 $name =
'RedHat.tar.gz';
47 $safeName = escapeDots($name);
48 $this->host = getHost($URL);
53 $page = $this->mybrowser->get($URL);
54 $page = $this->mybrowser->clickLink(
'Browse');
55 $this->assertTrue($this->myassertText($page,
'/Browse/'),
56 "verifySimpletest FAILED! Could not find Browse menu\n");
57 $page = $this->mybrowser->clickLink(
'Testing');
58 $this->assertTrue($this->myassertText($page,
"/$safeName/"),
59 "verifySimpleTest FAILED! Could not find RedHat.tar upload\n");
60 $result = $this->myassertText($page,
"/$name/");
71 print
"starting print lics\n";
72 $page = $this->mybrowser->clickLink(
'Browse');
73 $this->assertTrue($this->myassertText($page,
'/Browse/'),
74 "verifySimpleTest FAILED! Could not find Browse menu\n");
75 $this->assertTrue($this->myassertText($page,
"/Browse/"),
76 "verifySimpleTest FAILED! Browse Title not found\n");
77 $this->assertTrue($this->myassertText($page,
"/$safeName/"),
78 "verifySimpleTest FAILED! did not find $name\n");
79 $this->assertTrue($this->myassertText($page,
"/>View</"),
80 "verifySimpletest FAILED! >View< not found\n");
81 $this->assertTrue($this->myassertText($page,
"/>Info</"),
82 "verifySimpletest FAILED! >Info< not found\n");
83 $this->assertTrue($this->myassertText($page,
"/>Download</"),
84 "verifySimpletest FAILED! >Download< not found\n");
87 $page = $this->mybrowser->clickLink(
'Testing');
88 $page = $this->mybrowser->clickLink($name);
90 $this->assertTrue($this->myassertText($page,
"/1 item/"),
91 "verifySimpletest FAILED! '1 item' not found\n");
92 $this->assertTrue($this->myassertText($page,
"/RedHat/"),
93 "verifySimpletest FAILED! 'RedHat' not found\n");
94 $page = $this->mybrowser->clickLink(
'RedHat/');
99 $miniMenu = $mini->parseMiniMenu();
101 $url = makeUrl($this->host, $miniMenu[
'Nomos License']);
102 if($url === NULL) { $this->fail(
"RHEL Lics Failed, host/URL is not set"); }
104 $page = $this->mybrowser->get($url);
108 $ct->parseLicenseTbl();
111 $this->fail(
"Error! table with id=copyright has no rows!" .
112 " nothing to process, There should be!\n");
114 else if(empty($ct->hList)) {
115 $this->fail(
"Error! table with id=copyright was not found on" .
116 "the page, There should be one\n");
120 print
"\$copyStd = array(\n";
121 foreach($ct->hList as $list)
123 $cs = cleanString($list[
'textOrLink']);
124 print
" '$cs' => $list[count],\n";
125 $total += (int)$list[
'count'];
Login($User=NULL, $Password=NULL)