clear() public method

Clear a log.
public clear ( string $log )
$log string
Example #1
0
 public function testClear()
 {
     $app = $this->getApp();
     $mocker = new DoctrineMockBuilder();
     $db = $mocker->getConnectionMock();
     $db->expects($this->at(1))->method('executeQuery')->with($this->equalTo("TRUNCATE bolt_log_system"));
     $db->expects($this->at(2))->method('executeQuery')->with($this->equalTo("TRUNCATE bolt_log_change"));
     $app['db'] = $db;
     $log = new Manager($app);
     $log->clear('system');
     $log->clear('change');
     $this->setExpectedException('Exception', 'Invalid log type requested: invalid');
     $log->clear('invalid');
 }