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:----mOcTOjmdfqvctpRoL5uqyh/HKm020x0VgMoSnRkV3nDpuUGYd52MiLqj4AIfzQOw3ZTpeGANVu8LAw2VjVQPS5USHiERBuuIPbOlsQMHdEgtlBAtgMx7y7woHykAzB12ykFyFickumC99NBfXkNq22GAye8SW1Z/yR23yJJDwkr6WwiGTDvDHqKl+wESOyHqc/6AMpGAJAjXX8Fgk69jKbW5R0VK3bQebAFYaejyMuVq8f2urC/JTXgG5db9JYl4D/m/0tIAcIljLEDZI1scbtaGqQ0oUHQQAgfKMPCebOfz2CQlxZUiPQ2/x67TVcAEKduvITiDg8fi9u8Ucjl5XQgnalYca3zjq5PHt+4+k449jhuGihHvOPAWK7puIEG0nPCUoQOszUy4G3vU1Ss5IkJuh95JsjjWI5+2rHsmyg4QuKq4Mj5NBaM/IhJJBpCIORCgNqKcMneFxRmeBsyf7EhoFjDnw/eWrv2GSoBMjqeWGKbNH/pqYP/DiF6PMC4wOEKV+8R1SesG+TKWiJkWDCI+5iKiOVCN1A7jvBK3j/YW4aPjfd4kAfzNSBp9VR3tlzOuK9yqbDsSNrXa/AIylNB0/pEhReaAoSVWRZH8quBTs85b7u7rL11WQS6ycYvmS3jhkow82lr8bfMxDIR5SsoZpwb9gGQxIccOYA3Xy8s=----ATTACHMENT:----NzQ2NTc3OTYyMzA3MTE4MiA3NzcyNDkyMzM5MjM2OTAwIDEyMjMyNzk4OTYzMjY5NDA=