private function saveMessagesWithEmptyCheck($messages) { if ($messages) { Session::set('messages', $messages); } else { Session::remove('messages'); } }
/** * @test */ public function removeShouldDoNothingIfElementDoesNotExist() { //when Session::remove('key1'); //then Assert::thatSession()->isEmpty(); }
/** * @test */ public function shouldSaveStatsIfDebugIsOn() { //given Config::overrideProperty('debug')->with(true); Session::remove('stats_queries'); Route::get('/sample/save', 'sample#save'); //when $this->get('/sample/save'); //then $this->assertNotEmpty(Session::get('stats_queries')); }
public static function reset() { Session::remove('stats_queries'); }