/** * Clears all trigger logs */ public static function clearLogs(X2DbTestCase $that = null) { Yii::app()->db->createCommand('delete from x2_trigger_logs where 1=1')->execute(); $count = Yii::app()->db->createCommand('select count(*) from x2_trigger_logs where 1=1')->queryScalar(); if ($that) { $that->assertTrue($count === '0'); } }