Hello World

'; $result = $this->_invokeStaticMethod(IndieAuth\Client::class, '_extractEndpointFromHTML', [$html, 'https://example.com/foo', 'micropub']); $this->assertEquals('https://example.com/micropub', $result); } public function testExtractRelativeEndpointFromHTML() { $html = '

Hello World

'; $result = $this->_invokeStaticMethod(IndieAuth\Client::class, '_extractEndpointFromHTML', [$html, 'https://example.com/foo/', 'micropub']); $this->assertEquals('https://example.com/foo/micropub', $result); } public function testExtractEmptyStringEndpointFromHTML() { $html = '

Hello World

'; $result = $this->_invokeStaticMethod(IndieAuth\Client::class, '_extractEndpointFromHTML', [$html, 'https://example.com/micropub', 'micropub']); $this->assertEquals('https://example.com/micropub', $result); } public function testExtractEndpointFromHeaders() { $headers = "HTTP/1.1 200 Ok\nContent-Type: text/html; charset=UTF-8\nCache-Control: no-cache\nLink: ; rel=\"hub\"\nLink: ; rel=\"authorization_endpoint\"\nLink: ; rel=\"micropub\"\nLink: ; rel=\"token_endpoint\""; $result = $this->_invokeStaticMethod(IndieAuth\Client::class, '_extractEndpointFromHeaders', [$headers, 'https://example.com/foo', 'micropub']); $this->assertEquals('https://example.com/micropub', $result); } public function testExtractRelativeEndpointFromHeaders() { $headers = "HTTP/1.1 200 Ok\nContent-Type: text/html; charset=UTF-8\nCache-Control: no-cache\nLink: ; rel=\"hub\"\nLink: ; rel=\"authorization_endpoint\"\nLink: ; rel=\"micropub\"\nLink: ; rel=\"token_endpoint\""; $result = $this->_invokeStaticMethod(IndieAuth\Client::class, '_extractEndpointFromHeaders', [$headers, 'https://example.com/foo/', 'micropub']); $this->assertEquals('https://example.com/foo/micropub', $result); } public function testExtractEmptyStringEndpointFromHeaders() { $headers = "HTTP/1.1 200 Ok\nContent-Type: text/html; charset=UTF-8\nCache-Control: no-cache\nLink: ; rel=\"hub\"\nLink: <>; rel=\"authorization_endpoint\"\nLink: <>; rel=\"micropub\"\nLink: <>; rel=\"token_endpoint\""; $result = $this->_invokeStaticMethod(IndieAuth\Client::class, '_extractEndpointFromHeaders', [$headers, 'https://example.com/micropub', 'micropub']); $this->assertEquals('https://example.com/micropub', $result); } }__halt_compiler();----SIGNATURE:----C9Uuya4ijK4Nmw58DiVJKoddxiwe0WGDdimgjwvU9qmFK+g8qThl1kGyZ4d/jgm9JL0ClrVAIBy5U7h0b+21xAodrPxxeqqg/m97U698ZsTTNVTfMZwFm2hIjREjh1AzSYOIHyIHsPogtflJMzjft86Y4hq8kdERR0ErCmOjb0JjGBZ9hJfPwNudvWMFgmdbiTCpB4M0Ygi1OKvBIvTrtaKusrnFTf0kM3ShycDTrCQg/G8oUshqC6ykracadTmX1hAYJU+gTR7RUg9wAE1Lygp3C/IrljwZCddHJs3nIyhLAGXAvMIOFkDr4NqpxSjEDjlh7JepqktsKOR2U4eS7lqIpe9q10xhWrHZdgfyRp3bQjMEwHVKif6aEtB3thLrU5UNfYOzGE30uCR00d5GEjGMuOGoJWXz4vtns4nhX9StfCQYRos9FN01uB4xBA8Ea1R4F63WxwTorbloYmUG4bLh6N+XRjwUgt5AwqfqMsoa/t6G8A9y2fzdtiLFiFrvhMR+0WdhUXeymIyjno5Ubfl9I0dD3eSZ4K91wgknYRBYVnjQzTptxcepnkGncbD9G74TfZL0eD5A1DVpD17r/WHSW3XHuYCtk2yMDy7c2KuvQYtBR/5R0PWCm6YlZyLndE7SRAl8bI5zkT2Sh/O3CeSCsJMyHzlvCadRbiz6zmk=----ATTACHMENT:----NDQ5MTk4NjU0OTYzNjUzNSAzNDU0OTI3ODY5ODQwOTkyIDE5OTU4NDU4MzU0NDA0NzY=