mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
#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:
parent
ea7c87ec0d
commit
7619bce790
99 changed files with 31041 additions and 0 deletions
19
tests/modules/module/module.test.php
Normal file
19
tests/modules/module/module.test.php
Normal 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());
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue