Skip to content

Commit

Permalink
fix test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
thousandsofthem committed Jun 30, 2012
1 parent 86228ad commit 84c62cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_scheduling.php
Expand Up @@ -12,21 +12,21 @@ function tearDown() {
}

function postScheduleAdvanced(){
$schedule_id = $this->worker->postScheduleAdvanced('TestWorker', array(), time(), 2, null, 2);
$schedule_id = $this->worker->postScheduleAdvanced('TestWorker', array(), time(), 60, null, 2);
$this->assertTrue(is_string($schedule_id));
$this->assertTrue(strlen($schedule_id) > 0);
}


function testGetSchedules(){
$this->worker->postScheduleAdvanced('TestWorker', array(), time()+60, 60, null, 2);
$schedules = $this->worker->getSchedules();
$this->assertTrue(is_array($schedules));
$this->assertTrue(strlen($schedules[0]->id) > 0);
}


function testGetSchedule(){
$schedule_id = $this->worker->postScheduleAdvanced('TestWorker', array(), time()+60, 2, null, 1);
$schedule_id = $this->worker->postScheduleAdvanced('TestWorker', array(), time()+60, 60, null, 1);
$schedule = $this->worker->getSchedule($schedule_id);
$this->assertEqual($schedule->code_name, 'TestWorker');
$this->assertEqual($schedule->status, 'scheduled');
Expand All @@ -35,7 +35,7 @@ function testGetSchedule(){


function testDeleteSchedule(){
$schedule_id = $this->worker->postScheduleAdvanced('TestWorker', array(), time()+60, 2, null, 1);
$schedule_id = $this->worker->postScheduleAdvanced('TestWorker', array(), time()+60, 60, null, 1);
$res = $this->worker->deleteSchedule($schedule_id);
$this->assertEqual($res->status_code, 200);
}
Expand Down

0 comments on commit 84c62cb

Please sign in to comment.