[Solar-talk] New PHPUnit3 Tests
Rodrigo Moraes
rodrigo.moraes at gmail.com
Fri Dec 8 12:23:50 PST 2006
An update: the include_path problem occurs on StackTest::testFind().
For some reason, after the first assertSame() the method is aborted,
and so the include path is not reset at the end of the method:
// should find it at a
$actual = $stack->find('target1');
$this->assertSame("{$path[0]}/target1", $actual);
// should find it at b
$actual = $stack->find('target2');
$this->assertSame("{$path[1]}/target2", $actual);
// should find it at c
$actual = $stack->find('target3');
$this->assertSame("{$path[2]}/target3", $actual);
This won't crash:
// should find it at a
$actual = $stack->find('target1');
$this->assertSame($path[0] . DIRECTORY_SEPARATOR . 'target1', $actual);
// should find it at b
$actual = $stack->find('target2');
$this->assertSame($path[1] . DIRECTORY_SEPARATOR . 'target2', $actual);
// should find it at c
$actual = $stack->find('target3');
$this->assertSame($path[2] . DIRECTORY_SEPARATOR . 'target3', $actual);
The same should be applied to StackTest::testFindReal().
After that I have:
FAILURES!
Tests: 909, Failures: 15, Skipped: 62.
Almost all failures are path related (the mess that windows does with
/ \ etc). Very expected.
No changes were needed in SolarUnitTest.config.php or
configRunner.php. I've only added some database configs in
config.inc.php, and applied the changes above in StackTest.
If PATH_SEPARATOR and DIRECTORY_SEPARATOR is used in StackTest insted
of : and /, that class generates no failures and the best result I
had:
FAILURES!
Tests: 909, Failures: 8, Skipped: 62.
:-D
rodrigo
More information about the solar-talk
mailing list