Home > Archive > PHP Pear > May 2006 > [PHPUnit] cannot find test file
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
[PHPUnit] cannot find test file
|
|
| Jared Nedzel 2006-05-19, 7:00 pm |
| I'm trying to use PHPUnit 2.3.5 on Fedora Core 4. I'm using PHP 5.1.0.
I installed PHPUnit2 using PEAR.
My test is very simple:
<?php
require_once 'PHPUnit2/Framework/TestCase.php';
class SimpleTest extends PHPUnit2_Framework_TestCase {
public function testThis() {
$this->assertEquals(1, 2);
}
}
?>
I'm trying to run the command-line test runner using:
phpunit SimpleTest.php
I get the response:
SimpleTest.php could not be found or is not readable.
Thanks,
Jared
| |
| Sebastian Bergmann 2006-05-19, 7:00 pm |
| Jared Nedzel wrote:
> I'm trying to use PHPUnit 2.3.5 on Fedora Core 4.
Your example works fine here:
sb@wopr-mobile PHPUnit2 % cat SimpleTest.php
<?php
require_once 'PHPUnit2/Framework/TestCase.php';
class SimpleTest extends PHPUnit2_Framework_TestCase {
public function testThis() {
$this->assertEquals(1, 2);
}
}
?>
sb@wopr-mobile PHPUnit2 % ./phpunit SimpleTest
PHPUnit 3.0.0-dev by Sebastian Bergmann.
F
Time: 00:00
There was 1 failure:
1) testThis(SimpleTest)
failed asserting that <2> is equal to <integer:1>
expected integer <1>
difference <1>
got integer <2>
/usr/local/src/PHPUnit2/SimpleTest.php:6
/usr/local/src/PHPUnit2/phpunit:40
FAILURES!
Tests: 1, Failures: 1.
--
Sebastian Bergmann http://www.sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69
|
|
|
|
|