-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestClassA.php
More file actions
51 lines (39 loc) · 728 Bytes
/
TestClassA.php
File metadata and controls
51 lines (39 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
if( defined( 'ABSPATH' ) )
require_once( ABSPATH . 'config.php' );
else
{
if( file_exists( 'config.php' ) )
{
require_once( 'config.php' );
}
else
{
echo 'TestClassA.php : Cannot locate config.php';
}
}
require_once ( ABSPATH . 'ClassA.php' );
require_once ( ABSPATH . PUNIT_PATH .'TestCase.php' );
Class TestClassA extends TestCase
{
public function setUp()
{
echo ' TestClassA : setUp() ', PHP_EOL;
}
public function TestAdd()
{
$a = new ClassA();
$sum = $a->Add( 2 , 4 );
echo 'Sum: ' , $sum, PHP_EOL;
sleep(1);
AssertEqual( $sum, 6 );
}
public function tearDown()
{
echo ' TestClassA : tearDown() ', PHP_EOL;
}
}
//Fake main
//$a = new TestClassA();
//$a->TestAdd();
?>