/** * @test */ public function shouldReturnEmptyArrayForNull() { //when $parsed = AcceptHeaderParser::parse(null); //then $this->assertEmpty($parsed); }
public static function accept() { $accept = Arrays::getValue($_SERVER, 'HTTP_ACCEPT'); return AcceptHeaderParser::parse($accept); }