public function testGetAuthenticationSchemasWithDifferentTypes() { $BasicAuthentication = ['Basic']; $DigestAuthentication = ['Digest']; $this->assertEquals([], HttpAuthenticationA::getAuthenticationSchemas(HttpAuthenticationA::NONE)); $this->assertEquals($BasicAuthentication, HttpAuthenticationA::getAuthenticationSchemas(HttpAuthenticationA::BASIC)); $this->assertEquals($DigestAuthentication, HttpAuthenticationA::getAuthenticationSchemas(HttpAuthenticationA::DIGEST)); $this->assertEquals(array_merge($BasicAuthentication, $DigestAuthentication), HttpAuthenticationA::getAuthenticationSchemas(HttpAuthenticationA::DIGEST | HttpAuthenticationA::BASIC)); }
/** * @return string */ public function getValidAuthenticationSchemas() { return HttpAuthenticationA::getAuthenticationSchemas($this->iAuthenticationType); }