FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
test-showjobs.php
1 <?php
2 /***********************************************************
3  Copyright (C) 2012 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 
24 require_once(dirname(dirname(dirname(dirname(__FILE__))))."/lib/php/Plugin/FO_Plugin.php");
25 require_once(dirname(dirname(dirname(dirname(__FILE__))))."/lib/php/common.php");
26 require_once(dirname(dirname(dirname(__FILE__)))."/ui/showjobs.php");
27 
31 class test_showjobs extends \PHPUnit\Framework\TestCase {
35  protected function setUp()
36  {
37  DBconnect("/usr/local/etc/fossology/");
38  }
39 
44  function test_ShowJobDB() {
45  global $NewPlugin;
46  $res = $NewPlugin->ShowJobDB(1);
47  }
48 
49 
50  /*
51  * \brief testing Uploads2Jobs()
52  * \todo use testing DB, poplulate data
53  */
54  function test_Uploads2Jobs() {
55  global $NewPlugin;
56  $res = $NewPlugin->Uploads2Jobs(array(6));
57  }
58 
62  protected function tearDown() {
63  global $PG_CONN;
64  pg_close($PG_CONN);
65  }
66 }
setUp()
initialization
DBconnect($sysconfdir, $options="", $exitOnFail=true)
Connect to database engine. This is a no-op if $PG_CONN already has a value.
Definition: common-db.php:44
tearDown()
clean up
foreach($Options as $Option=> $OptVal) if(0==$reference_flag &&0==$nomos_flag) $PG_CONN
test_ShowJobDB()
testing ShowJobDB()