Phpunit

Yet another post

[[Wiki]]

h1. Phpunit

  • http://www.phpunit.de/manual/current/en/installation.html
sudo pear config-set auto_discover 1
sudo pear install pear.phpunit.de/PHPUnit

sudo pear install --alldeps --force phpunit/phpunit
nano test.php

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));
    }
}
?>

phpunit --verbose StackTest