I am writing my first database test using PHPUnit. I am going to make a fixture and test my database with accoring to this link.
anyhow before I do that I wanted to write a simple test, here is my test:
<?php
class MyTest extends PHPUnit_Framework_TestCase
{
public function testCalculate()
{
$this->assertEquals(2, 1 + 1);
}
}
?>
when I run this using this command: php -f myPHPTest.php
I get the following error:
PHP Fatal error: Class 'PHPUnit_Framework_TestCase' not found in C:\wamp\www\SV
N\tests\MyPHPTest.php on line 3
PHP Stack trace:
PHP 1. {main}() C:\wamp\www\SVN\tests\MyPHPTest.php:0
Fatal error: Class 'PHPUnit_Framework_TestCase' not found in C:\wamp\www\SVN\tes
ts\MyPHPTest.php on line 3
Call Stack:
0.0011 234848 1. {main}() C:\wamp\www\SVN\tests\MyPHPTest.php:0
how can I solve this and what do I have to do to write my first database test?
Aucun commentaire:
Enregistrer un commentaire