forked from the-crucible/phpunit-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path28GreaterThan.php
More file actions
31 lines (28 loc) · 838 Bytes
/
28GreaterThan.php
File metadata and controls
31 lines (28 loc) · 838 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
<?php
/**
* assertGreaterThan(mixed $expected, mixed $actual[, string $message = ''])
*
* Reports an error identified by $message if the value of
* $actual is not greater than the value of $expected.
*
* assertAttributeGreaterThan() is a convenience wrapper that uses a public,
* protected, or private attribute of a class or object as the actual value.
*/
class GreaterThanTest extends PHPUnit_Framework_TestCase
{
public function testFailure()
{
$this->assertGreaterThan(2, 1);
}
public function testAttributeStatic(){
$this->assertAttributeGreaterThan(2, 'foo', 'BarGreater');
}
public function testAttributeObject(){
$this->assertAttributeGreaterThan(2, 'foo1', new BarGreater());
}
}
class BarGreater{
public static $foo = 1;
public $foo1 = 1;
}
?>