FOSSology  4.4.0
Open Source License Compliance by Open Source Software
upl1File.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2008 Hewlett-Packard Development Company, L.P.
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
7 
22 require_once ('fossologyTestCase.php');
23 require_once ('TestEnvironment.php');
24 
25 global $URL;
26 global $PROXY;
27 
29 {
30  public $mybrowser;
31  public $webProxy;
32 
33  function setUp()
34  {
35  global $URL;
36  $this->Login();
37  }
38 
43  {
44  global $URL;
45  print "Creating Testing folder\n";
46  $page = $this->mybrowser->get($URL);
47  $this->createFolder(null, 'Testing', null);
48 
49  print "Creating Copyright folder\n";
50  $this->createFolder(null, 'Copyright', null);
51  }
52 
53  function testuploadTestDataTest() {
54 
55  global $URL;
56  global $PROXY;
57 
58  print "starting testUploadTestData\n";
59  $rootFolder = 1;
60  $upload = NULL;
61  $uploadList = array('TestData/archives/foss23D1F1L.tar.bz2');
62 
63 
64  /* upload the archives using the upload from file menu
65  *
66  * 1 = bucket agent
67  * 2 = copyright agent
68  * 3 = mime agent
69  * 4 = metadata agent
70  * 5 = nomos agent
71  * 6 = package agent
72  */
73 
74  print "Starting file uploads\n";
75  foreach($uploadList as $upload) {
76  $description = "File $upload uploaded by Upload Test Data Test";
77  $this->uploadFile('Testing', $upload, $description, null, '1,2,3,4');
78  }
79  }
80 }
uploadFile($parentFolder, $uploadFile, $description=null, $uploadName=null, $agents=null)
createFolder($parent, $name, $description=null)
Login($User=NULL, $Password=NULL)