30 require_once (
'../../../tests/fossologyTestCase.php');
31 require_once (
'../../../tests/TestEnvironment.php');
39 protected function setUp() {
41 $this->CreateFolder(1,
'Enote',
'Folder for Email notification uploads');
44 public function testUploadWEmail() {
48 print
"Starting UploadWEmail test...\n";
51 $page = $this->mybrowser->get($URL);
53 $File =
'/home/fosstester/licenses/Apache-v1.1';
54 $Filedescription =
"The Apache License Version 1.1 from the Apache site";
56 $Url =
'http://www.apache.org/licenses/LICENSE-2.0';
57 $Urldescription =
"The Apache License Version 2.0 from www.apache.org/licenses/LICENSE-2.0";
59 $Srv =
'/home/fosstester/archives/foss23D1F1L.tar.bz2';
60 $Srvdescription =
"fossology test archive";
62 $this->
uploadFile(
'Enote', $File, $Filedescription, null,
'1');
63 $this->
uploadUrl(
'Enote', $Url, $Urldescription, null,
'2');
64 $this->
uploadServer(
'Enote', $Srv, $Srvdescription, null,
'all');
73 print
"Verifying jobs exist\n";
74 $srvFile = basename($Srv);
75 if(array_key_exists($srvFile,$jobs)) {
79 $this->fail(
"upload $Srv not found\n");
81 $urlFile = basename($Url);
82 if(array_key_exists($urlFile,$jobs)) {
86 $this->fail(
"upload $Url not found\n");
89 $FileName = basename($File);
90 if(array_key_exists($FileName,$jobs)) {
94 $this->fail(
"upload $FileName not found\n");
99 print
"waiting for jobs to finish\n";
101 print
"verifying correct email was received\n";
103 $this->fail(
"checkEmailNotification failed, is local email configured?\n");
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)