-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path03DependencyFailureTest.php
52 lines (46 loc) · 1.09 KB
/
03DependencyFailureTest.php
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
52
<?php
/**
* This class is an example of what happened when a function on which other
* functions are dependent get failed
*
* Please see the results by running it
* Result Expected is:
*
* FAILURES!
* Tests: 1, Assertions: 1, Failures: 1, Skipped: 2.
*/
class DependencyFailureTest extends PHPUnit_Framework_TestCase
{
/**
* This method is written to fail. testTwo() and
* testThree() functions are dependent on this function.
* If this function get failed all the dependent function
* should fail.
*
*/
public function testOne()
{
# This should fail :)
$this->assertTrue(FALSE);
return array();
}
/**
* This test will never get executed because the function
* it depends will not get passed
*
* @depends testOne
*/
public function testTwo($arr)
{
}
/**
* This test will also never get executed because the function
* it depends will not get passed
*
* @depends testOne
*/
public function testThree($arr)
{
}
}
?>