19 require_once (
'../../../tests/fossologyTestCase.php');
20 require_once (
'../../../tests/TestEnvironment.php');
28 public function setUp() {
30 $last = exec(
'./changeENV.php -s fosstester -c noemail', $out, $rtn);
32 $this->fail(
"Could not change the test environment file, stopping test\n");
33 print
"Failure, output from changeENV is:\n";print_r($out) .
"\n";
38 $result = $this->
createFolder(1,
'Enote',
'Folder for Email notification uploads');
39 if(!is_null($result)) {
40 if($result !=
'Folder Enote Exists') {
41 $this->fail(
"Failure! folder Enote does not exist, stopping test\n");
47 public function testUploadWoutEmail() {
52 print
"Starting upload without email notificiation\n";
53 $page = $this->mybrowser->get($URL);
55 $File =
'/home/fosstester/licenses/gplv2.1';
56 $Filedescription =
"The GPL Version 2.1 from the gnu.org site";
58 $Url =
'http://www.gnu.org/licenses/gpl.txt';
59 $Urldescription =
"The GPL Version 3.0 June 2007 from www.gnu.org/licenses/gpl.txt";
61 $Srv =
'/home/fosstester/licenses/zlibLicense-1.2.2-2004-Oct-03';
62 $Srvdescription =
"zlib license from http://www.gzip.org/zlib/zlib_license.html";
64 $this->
uploadFile(
'Enote', $File, $Filedescription,
null,
'1');
65 $this->
uploadUrl(
'Enote', $Url, $Urldescription,
null,
'2');
66 $this->
uploadServer(
'Enote', $Srv, $Srvdescription,
null,
'all');
71 print
"waiting for jobs to finish\n";
73 print
"verifying NO email was received\n";
77 public function tearDown() {
78 print
"Changing user back to fosstester";
79 $last = exec(
'./changeENV.php -s noemail -c fosstester', $out, $rtn);
81 $this->fail(
"Could not change the test environment file, stopping test\n");
82 print
"Failure, output from changeENV is:\n";print_r($out) .
"\n";
uploadServer($parentFolder, $uploadPath, $description=null, $uploadName=null, $agents=null)
uploadUrl($parentFolder, $url, $description=null, $uploadName=null, $agents=null)
checkEmailNotification($number)
uploadFile($parentFolder, $uploadFile, $description=null, $uploadName=null, $agents=null)
createFolder($parent, $name, $description=null)
Login($User=NULL, $Password=NULL)