forked from the-crucible/phpunit-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path20Equals1.php
More file actions
43 lines (40 loc) · 937 Bytes
/
20Equals1.php
File metadata and controls
43 lines (40 loc) · 937 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
<?php
/**
* assertEquals(
* mixed $expected,
* mixed $actual[,
* string $message = '']
* )
*
* Reports an error identified by $message if the two variables $expected
* and $actual are not equal.
*
* assertNotEquals() is the inverse of this
* assertion and takes the same arguments.
*
* assertAttributeEquals() and assertAttributeNotEquals() are convenience
* wrappers that use a public, protected, or private attribute
* of a class or object as the actual value.
*/
class EqualsTest extends PHPUnit_Framework_TestCase
{
/**
* Testing integer
*/
public function testInteger()
{
$this->assertEquals(1, 0);
}
/**
* Testing strings
*/
public function testString()
{
$this->assertEquals('bar', 'baz');
}
public function testStringAnother()
{
$this->assertEquals("foo\nbar\nbaz\n", "foo\nbah\nbaz\n");
}
}
?>