CC-2166: Packaging Improvements. Moved the Zend app into airtime_mvc. It is now installed to /var/www/airtime. Storage is now set to /srv/airtime/stor. Utils are now installed to /usr/lib/airtime/utils/. Added install/airtime-dircheck.php as a simple test to see if everything is install/uninstalled correctly.
This commit is contained in:
parent
514777e8d2
commit
b11cbd8159
4546 changed files with 138 additions and 51 deletions
99
airtime_mvc/library/pear/Calendar/tests/minute_test.php
Normal file
99
airtime_mvc/library/pear/Calendar/tests/minute_test.php
Normal file
|
@ -0,0 +1,99 @@
|
|||
<?php
|
||||
// $Id: minute_test.php 159563 2004-05-24 22:25:43Z quipo $
|
||||
|
||||
require_once('simple_include.php');
|
||||
require_once('calendar_include.php');
|
||||
|
||||
require_once('./calendar_test.php');
|
||||
|
||||
class TestOfMinute extends TestOfCalendar {
|
||||
function TestOfMinute() {
|
||||
$this->UnitTestCase('Test of Minute');
|
||||
}
|
||||
function setUp() {
|
||||
$this->cal = new Calendar_Minute(2003,10,25,13,32);
|
||||
}
|
||||
function testPrevDay_Array () {
|
||||
$this->assertEqual(
|
||||
array(
|
||||
'year' => 2003,
|
||||
'month' => 10,
|
||||
'day' => 24,
|
||||
'hour' => 0,
|
||||
'minute' => 0,
|
||||
'second' => 0),
|
||||
$this->cal->prevDay('array'));
|
||||
}
|
||||
function testPrevSecond () {
|
||||
$this->assertEqual(59,$this->cal->prevSecond());
|
||||
}
|
||||
function testThisSecond () {
|
||||
$this->assertEqual(0,$this->cal->thisSecond());
|
||||
}
|
||||
function testThisSecond_Timestamp () {
|
||||
$this->assertEqual($this->cal->cE->dateToStamp(
|
||||
2003, 10, 25, 13, 32, 0),
|
||||
$this->cal->thisSecond('timestamp'));
|
||||
}
|
||||
function testNextSecond () {
|
||||
$this->assertEqual(1,$this->cal->nextSecond());
|
||||
}
|
||||
function testNextSecond_Timestamp () {
|
||||
$this->assertEqual($this->cal->cE->dateToStamp(
|
||||
2003, 10, 25, 13, 32, 1),
|
||||
$this->cal->nextSecond('timestamp'));
|
||||
}
|
||||
function testGetTimeStamp() {
|
||||
$stamp = mktime(13,32,0,10,25,2003);
|
||||
$this->assertEqual($stamp,$this->cal->getTimeStamp());
|
||||
}
|
||||
}
|
||||
|
||||
class TestOfMinuteBuild extends TestOfMinute {
|
||||
function TestOfMinuteBuild() {
|
||||
$this->UnitTestCase('Test of Minute::build()');
|
||||
}
|
||||
function testSize() {
|
||||
$this->cal->build();
|
||||
$this->assertEqual(60,$this->cal->size());
|
||||
}
|
||||
function testFetch() {
|
||||
$this->cal->build();
|
||||
$i=0;
|
||||
while ( $Child = $this->cal->fetch() ) {
|
||||
$i++;
|
||||
}
|
||||
$this->assertEqual(60,$i);
|
||||
}
|
||||
function testFetchAll() {
|
||||
$this->cal->build();
|
||||
$children = array();
|
||||
$i = 0;
|
||||
while ( $Child = $this->cal->fetch() ) {
|
||||
$children[$i]=$Child;
|
||||
$i++;
|
||||
}
|
||||
$this->assertEqual($children,$this->cal->fetchAll());
|
||||
}
|
||||
function testSelection() {
|
||||
require_once(CALENDAR_ROOT . 'Second.php');
|
||||
$selection = array(new Calendar_Second(2003,10,25,13,32,43));
|
||||
$this->cal->build($selection);
|
||||
$i = 0;
|
||||
while ( $Child = $this->cal->fetch() ) {
|
||||
if ( $i == 43 )
|
||||
break;
|
||||
$i++;
|
||||
}
|
||||
$this->assertTrue($Child->isSelected());
|
||||
}
|
||||
}
|
||||
|
||||
if (!defined('TEST_RUNNING')) {
|
||||
define('TEST_RUNNING', true);
|
||||
$test = &new TestOfMinute();
|
||||
$test->run(new HtmlReporter());
|
||||
$test = &new TestOfMinuteBuild();
|
||||
$test->run(new HtmlReporter());
|
||||
}
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue