19 require_once (
'../../../tests/fossologyTestCase.php');
20 require_once (
'../../../tests/TestEnvironment.php');
28 protected function setUp() {
30 $this->CreateFolder(1,
'Enote',
'Folder for Email notification uploads');
33 public function testUploadWEmail() {
37 print
"Starting UploadWEmail test...\n";
40 $page = $this->mybrowser->get($URL);
42 $File =
'/home/fosstester/licenses/Apache-v1.1';
43 $Filedescription =
"The Apache License Version 1.1 from the Apache site";
45 $Url =
'http://www.apache.org/licenses/LICENSE-2.0';
46 $Urldescription =
"The Apache License Version 2.0 from www.apache.org/licenses/LICENSE-2.0";
48 $Srv =
'/home/fosstester/archives/foss23D1F1L.tar.bz2';
49 $Srvdescription =
"fossology test archive";
51 $this->
uploadFile(
'Enote', $File, $Filedescription,
null,
'1');
52 $this->
uploadUrl(
'Enote', $Url, $Urldescription,
null,
'2');
53 $this->
uploadServer(
'Enote', $Srv, $Srvdescription,
null,
'all');
62 print
"Verifying jobs exist\n";
63 $srvFile = basename($Srv);
64 if(array_key_exists($srvFile,$jobs)) {
68 $this->fail(
"upload $Srv not found\n");
70 $urlFile = basename($Url);
71 if(array_key_exists($urlFile,$jobs)) {
75 $this->fail(
"upload $Url not found\n");
78 $FileName = basename($File);
79 if(array_key_exists($FileName,$jobs)) {
83 $this->fail(
"upload $FileName not found\n");
88 print
"waiting for jobs to finish\n";
90 print
"verifying correct email was received\n";
92 $this->fail(
"checkEmailNotification failed, is local email configured?\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)
Login($User=NULL, $Password=NULL)