30 require_once (
'../../../tests/fossologyTestCase.php');
31 require_once (
'../../../tests/TestEnvironment.php');
39 public function setUp() {
41 $last = exec(
'./changeENV.php -s fosstester -c noemail', $out, $rtn);
43 $this->fail(
"Could not change the test environment file, stopping test\n");
44 print
"Failure, output from changeENV is:\n";print_r($out) .
"\n";
49 $result = $this->
createFolder(1,
'Enote',
'Folder for Email notification uploads');
50 if(!is_null($result)) {
51 if($result !=
'Folder Enote Exists') {
52 $this->fail(
"Failure! folder Enote does not exist, stopping test\n");
58 public function testUploadWoutEmail() {
63 print
"Starting upload without email notificiation\n";
64 $page = $this->mybrowser->get($URL);
66 $File =
'/home/fosstester/licenses/gplv2.1';
67 $Filedescription =
"The GPL Version 2.1 from the gnu.org site";
69 $Url =
'http://www.gnu.org/licenses/gpl.txt';
70 $Urldescription =
"The GPL Version 3.0 June 2007 from www.gnu.org/licenses/gpl.txt";
72 $Srv =
'/home/fosstester/licenses/zlibLicense-1.2.2-2004-Oct-03';
73 $Srvdescription =
"zlib license from http://www.gzip.org/zlib/zlib_license.html";
75 $this->
uploadFile(
'Enote', $File, $Filedescription, null,
'1');
76 $this->
uploadUrl(
'Enote', $Url, $Urldescription, null,
'2');
77 $this->
uploadServer(
'Enote', $Srv, $Srvdescription, null,
'all');
82 print
"waiting for jobs to finish\n";
84 print
"verifying NO email was received\n";
88 public function tearDown() {
89 print
"Changing user back to fosstester";
90 $last = exec(
'./changeENV.php -s noemail -c fosstester', $out, $rtn);
92 $this->fail(
"Could not change the test environment file, stopping test\n");
93 print
"Failure, output from changeENV is:\n";print_r($out) .
"\n";
createFolder($parent=null, $name, $description=null)
uploadFile($parentFolder, $uploadFile, $description=null, $uploadName=null, $agents=null)
uploadUrl($parentFolder=1, $url, $description=null, $uploadName=null, $agents=null)
checkEmailNotification($number)
Login($User=NULL, $Password=NULL)
uploadServer($parentFolder=1, $uploadPath, $description=null, $uploadName=null, $agents=null)