FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
duplicate-Upfolder.php
1 <?php
2 
3 /***********************************************************
4  Copyright (C) 2008 Hewlett-Packard Development Company, L.P.
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License
8  version 2 as published by the Free Software Foundation.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  ***********************************************************/
19 
38 class TestDupFolders extends UnitTestCase
39 {
40 
41  public $command = '/usr/local/bin/test.cp2foss';
42 
43  function TestDupUploadFolder()
44  {
45  $output = array ();
46  $error = exec("$this->command -p CP2fossTest/fldr1 -n foo -a /tmp/zlib.tar.bz2 -d \"a comment\"", $output, $retval);
47  //print_r($output);
48  $this->assertPattern('/Working on /', $output[0]);
49  $output = array ();
50  //
51  $error = exec("$this->command -p CP2fossTest/fldr1 -n foo -a /tmp/zlib.tar.bz2 -d 'Dup Upload folder test'", $output, $retval);
52  //print_r($output);
53  $this->assertPattern('/Warning: /', $output[5]);
54  }
55 }
56