Esempio n. 1
0
 /**
  * @test
  */
 public function taskFailsOnError()
 {
     $GLOBALS['TCA']['pages']['ctrl']['delete'] = 'deleted';
     $GLOBALS['TCA']['pages']['ctrl']['tstamp'] = 'tstamp';
     $tables = array('pages');
     $this->subject->setTcaTables($tables);
     $period = 14;
     $this->subject->setPeriod($period);
     $dbMock = $this->getMock(DatabaseConnection::class);
     $dbMock->expects($this->once())->method('sql_error')->willReturn(1049);
     $this->subject->setDatabaseConnection($dbMock);
     $this->assertFalse($this->subject->execute());
 }