FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
testClib.php
1 <?php
2 /*
3 Copyright (C) 2014-2015, Siemens AG
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 
20 use Mockery as M;
21 
26 if (!function_exists('Traceback_uri'))
27 {
28  function Traceback_uri(){
29  return 'Traceback_uri_if_desired';
30  }
31 }
32 
33 class TestCLib extends \PHPUnit\Framework\TestCase
34 {
36  private $testDb;
37 
38  protected function setUp()
39  {
40  $this->testDb = new TestPgDb("testlibc".time());
41  }
42 
43  protected function tearDown()
44  {
45  $this->testDb = null;
46  }
47 
48  public function testIt()
49  {
50  $sysConf = $this->testDb->getFossSysConf();
51  $returnCode = 0;
52  $lines = array();
53  exec("./testlibs ".$sysConf."/Db.conf", $lines, $returnCode);
54 
55  $this->assertEquals($expected=0, $returnCode, "error: ".implode("\n", $lines));
56  }
57 
58 
59 }
Traceback_uri()
Get the URI without query to this location.