Ouzo\Session::push PHP Method

push() public static method

public static push ( )
    public static function push()
    {
        return self::create()->push(func_get_args());
    }

Usage Example

Beispiel #1
0
 /**
  * @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');
 }
All Usage Examples Of Ouzo\Session::push