forked from the-crucible/phpunit-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path18Empty.php
More file actions
23 lines (22 loc) · 657 Bytes
/
18Empty.php
File metadata and controls
23 lines (22 loc) · 657 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
* assertEmpty(mixed $actual[, string $message = ''])
*
* Reports an error identified by $message if $actual is not empty.
*
* assertNotEmpty() is the inverse of this assertion and takes the same arguments.
* assertAttributeEmpty() and assertAttributeNotEmpty() are convenience wrappers
* that can be applied to a public, protected, or private attribute of a class or object.
*
*/
class EmptyTest extends PHPUnit_Framework_TestCase
{
public function testFailure()
{
$arr = array('foo');
#$arr = array();
#Uncommenting above line will pass this test
$this->assertEmpty($arr);
}
}
?>