FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
upl1File.php
1 <?php
2 /***********************************************************
3  Copyright (C) 2008 Hewlett-Packard Development Company, L.P.
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU General Public License
7  version 2 as published by the Free Software Foundation.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License along
15  with this program; if not, write to the Free Software Foundation, Inc.,
16  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  ***********************************************************/
18 
33 require_once ('fossologyTestCase.php');
34 require_once ('TestEnvironment.php');
35 
36 global $URL;
37 global $PROXY;
38 
40 {
41  public $mybrowser;
42  public $webProxy;
43 
44  function setUp()
45  {
46  global $URL;
47  $this->Login();
48  }
49 
54  {
55  global $URL;
56  print "Creating Testing folder\n";
57  $page = $this->mybrowser->get($URL);
58  $this->createFolder(null, 'Testing', null);
59 
60  print "Creating Copyright folder\n";
61  $this->createFolder(null, 'Copyright', null);
62  }
63 
64  function testuploadTestDataTest() {
65 
66  global $URL;
67  global $PROXY;
68 
69  print "starting testUploadTestData\n";
70  $rootFolder = 1;
71  $upload = NULL;
72  $uploadList = array('TestData/archives/foss23D1F1L.tar.bz2');
73 
74 
75  /* upload the archives using the upload from file menu
76  *
77  * 1 = bucket agent
78  * 2 = copyright agent
79  * 3 = mime agent
80  * 4 = metadata agent
81  * 5 = nomos agent
82  * 6 = package agent
83  */
84 
85  print "Starting file uploads\n";
86  foreach($uploadList as $upload) {
87  $description = "File $upload uploaded by Upload Test Data Test";
88  $this->uploadFile('Testing', $upload, $description, null, '1,2,3,4');
89  }
90  }
91 }
92 ?>
createFolder($parent=null, $name, $description=null)
uploadFile($parentFolder, $uploadFile, $description=null, $uploadName=null, $agents=null)
Login($User=NULL, $Password=NULL)