Created
August 29, 2016 16:13
-
-
Save jlamim/6aeee542c07c8201889ef7990b7fc64e to your computer and use it in GitHub Desktop.
Testes Unitários com PHPUnit no CodeIgniter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SampleTest extends PHPUnit_Framework_TestCase | |
{ | |
public function testPushAndPop() | |
{ | |
$stack = array(); | |
$this->assertEquals(0, count($stack)); | |
array_push($stack, 'foo'); | |
$this->assertEquals('foo', $stack[count($stack)-1]); | |
$this->assertEquals(1, count($stack)); | |
$this->assertEquals('foo', array_pop($stack)); | |
$this->assertEquals(0, count($stack)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment