FOSSology
3.2.0rc1
Open Source License Compliance by Open Source Software
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
SampleTestRunner.php
1
<?php
2
/***********************************************************
3
Copyright (C) 2010 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
27
/* every test must use these includes, adjust the paths based on where the
28
* tests are in the source tree.
29
*/
30
require_once (
'TestEnvironment.php'
);
31
require_once (
'fossologyTestCase.php'
);
32
33
global $URL;
34
35
class
runMyTest
extends
fossologyTestCase
36
{
37
public
$mybrowser;
38
public
$testFolder;
39
40
/*
41
* setUp is called before any other method by default.
42
*
43
* If other actions like creating a folder or something are needed,
44
* put them in the setUp method after login.
45
*
46
*/
47
function
setUp()
48
{
49
return
(TRUE);
50
}
51
/* all runnable test names (methods/functions) must start with 'test' */
52
function
testmytest()
53
{
54
// exec your test. The test should return 0 for pass 1 for fail
55
// the test can pass back more, but it must indicate pass and fail
56
$last = exec(
"pathToTest"
, $output, $rtn);
57
if
($rtn == 0) {
58
$this->pass();
59
}
60
else
{
61
$this->fail();
62
}
63
}
64
/* use the tearDown method to clean up after a test. This method like
65
* setUp will run after every test.
66
*/
67
68
function
tearDown()
69
{
70
return
(TRUE);
71
}
72
}
73
?>
runMyTest
Definition:
SampleTestRunner.php:35
fossologyTestCase
Definition:
fossologyTestCase.php:43
src
testing
templates
simpletest
SampleTestRunner.php
Generated on Mon Jun 29 2020 12:03:44 for FOSSology by
1.8.11