/** * @test */ public function shouldPushNestedSessionValueWhenArrayIsNotEmpty() { // given Session::push('key1', 'key2', 'value1'); Session::push('key1', 'key2', 'value2'); //when Session::push('key1', 'key2', 'value3'); //then Assert::thatSession()->hasSize(1); $value = Session::get('key1', 'key2'); Assert::thatArray($value)->containsExactly('value1', 'value2', 'value3'); }
public static function traceHttpRequest($params) { $uri = new Uri(); $requestDetails = $uri->getPathWithoutPrefix() . '#' . FrontController::$requestId; Session::push('stats_queries', $requestDetails, 'request_params', $params); }