APITokenTest.php 506 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * User: czPechy
  4. * Date: 30/07/2018
  5. * Time: 23:25
  6. */
  7. class APITokenTest extends TestCase
  8. {
  9. public function testGetHeaders()
  10. {
  11. $auth = new \Cloudflare\API\Auth\APIToken('zKq9RDO6PbCjs6PRUXF3BoqFi3QdwY36C2VfOaRy');
  12. $headers = $auth->getHeaders();
  13. $this->assertArrayHasKey('Authorization', $headers);
  14. $this->assertEquals('Bearer zKq9RDO6PbCjs6PRUXF3BoqFi3QdwY36C2VfOaRy', $headers['Authorization']);
  15. $this->assertCount(1, $headers);
  16. }
  17. }