#17528788 : unittest framework added

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6001 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2009-03-30 16:21:34 +00:00
parent ea7c87ec0d
commit 7619bce790
99 changed files with 31041 additions and 0 deletions

View file

@ -0,0 +1,19 @@
<?php
class LockTest extends UnitTestCase {
function testLock() {
$oController = &getController('module');
$this->assertNotNull($oController);
$output = $oController->lock('lockTest', 60);
$this->assertTrue($output->toBool());
$deadline = $output->get('deadline');
$output2 = $oController->lock('lockTest', 60);
$this->assertFalse($output2->toBool());
$output2 = $oController->unlock('lockTest', $deadline);
$this->assertTrue($output2->toBool());
$output2 = $oController->lock('lockTest', 60);
$this->assertTrue($output2->toBool());
$output2 = $oController->unlock('lockTest', $output2->get('deadline'));
$this->assertTrue($output2->toBool());
}
}
?>