public function testoptimise() { $aod_index = new AOD_Index(); $aod_index->id = 1; $aod_index->location = 'modules/AOD_Index/Index/Index'; $last_optimized = $aod_index->last_optimised; //execute the method and test if the last optimized date is changed to a later date/time. $aod_index->optimise(); $this->assertGreaterThan($last_optimized, $aod_index->last_optimised); }