/**
  * This tests that queueitems that are marked as regenerating, but are older 
  * than 10 minutes actually gets another try
  */
 public function testDeadEntries()
 {
     $oldObject = new StaticPagesQueue(array('URLSegment' => 'old/page', 'Freshness' => 'regenerating'));
     $oldObject->write();
     // Update the entry directly, this is the only way to change LastEdited to a set value
     DB::query('UPDATE "StaticPagesQueue" SET "LastEdited" =\'' . date("Y-m-d H:i:s", time() - 60 * 11) . '\'');
     Injector::inst()->get('URLArrayObject')->addUrls(array('monkey/bites' => 1), true);
     $this->assertEquals('monkey/bites', StaticPagesQueue::get_next_url());
     $this->assertEquals('old/page', StaticPagesQueue::get_next_url());
     Injector::inst()->get('URLArrayObject')->addUrls(array('should/be/next' => 1), true);
     $this->assertEquals('should/be/next', StaticPagesQueue::get_next_url());
 }