if ( !( $this->$q instanceof JobQueueDB ) ) {
$this->$q->setTestingPrefix( 'unittests-' . wfRandomString( 32 ) );
}
- } catch ( MWException $e ) {}; // unsupported? (@TODO: what if it was another error?)
+ } catch ( MWException $e ) {
+ // unsupported?
+ // @todo What if it was another error?
+ };
}
}
$queue->flushCaches();
$this->assertEquals( 2, $queue->getSize(), "Queue size is correct ($desc)" );
$this->assertEquals( 0, $queue->getAcquiredCount(), "No jobs active ($desc)" );
+ $jobs = iterator_to_array( $queue->getAllQueuedJobs() );
+ $this->assertEquals( 2, count( $jobs ), "Queue iterator size is correct ($desc)" );
$job1 = $queue->pop();
$this->assertFalse( $queue->isEmpty(), "Queue is not empty ($desc)" );