Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class AssertionsTest extends PHPUnit_Framework_TestCase
- {
- public function testAssertionsMethodsWorksWithCorrectArguments()
- {
- $this->assertTrue(1 == 1);
- $this->assertTrue(true);
- $this->assertFalse(false);
- $this->assertFalse(0 == 1);
- $this->assertEquals('foo', 'foo');
- $this->assertEquals(1, "1");
- $this->assertNotEquals(1, 2);
- $this->assertSame(1, 1);
- $this->assertNotSame(1, "1");
- $this->assertContains('foo', array('foo', 'otherValue'));
- $this->assertContains('foo', new ArrayIterator(array('foo', 'otherValue')));
- $this->assertNotContains('foo', array('otherValue'));
- $this->assertContainsOnly('string', array('foo', 'otherValue'));
- $this->assertArrayHasKey(0, array('foo'));
- $this->assertArrayHasKey('foo', array('foo' => 'bar', 'otherValue'));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement