FOSSology  4.4.0
Open Source License Compliance by Open Source Software
duplicate-Upfolder.php
1 <?php
2 
3 /*
4  SPDX-FileCopyrightText: © 2008 Hewlett-Packard Development Company, L.P.
5 
6  SPDX-License-Identifier: GPL-2.0-only
7 */
8 
27 class TestDupFolders extends UnitTestCase
28 {
29 
30  public $command = '/usr/local/bin/test.cp2foss';
31 
32  function TestDupUploadFolder()
33  {
34  $output = array ();
35  $error = exec("$this->command -p CP2fossTest/fldr1 -n foo -a /tmp/zlib.tar.bz2 -d \"a comment\"", $output, $retval);
36  //print_r($output);
37  $this->assertPattern('/Working on /', $output[0]);
38  $output = array ();
39  //
40  $error = exec("$this->command -p CP2fossTest/fldr1 -n foo -a /tmp/zlib.tar.bz2 -d 'Dup Upload folder test'", $output, $retval);
41  //print_r($output);
42  $this->assertPattern('/Warning: /', $output[5]);
43  }
44 }
45