UserServiceKeyTest.php 1010 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * User: junade
  4. * Date: 13/01/2017
  5. * Time: 18:03
  6. */
  7. class UserServiceKeyTest extends TestCase
  8. {
  9. public function testGetHeaders()
  10. {
  11. $auth = new \Cloudflare\API\Auth\UserServiceKey('v1.0-e24fd090c02efcfecb4de8f4ff246fd5c75b48946fdf0ce26c59f91d0d90797b-cfa33fe60e8e34073c149323454383fc9005d25c9b4c502c2f063457ef65322eade065975001a0b4b4c591c5e1bd36a6e8f7e2d4fa8a9ec01c64c041e99530c2-07b9efe0acd78c82c8d9c690aacb8656d81c369246d7f996a205fe3c18e9254a');
  12. $headers = $auth->getHeaders();
  13. $this->assertArrayHasKey('X-Auth-User-Service-Key', $headers);
  14. $this->assertEquals(
  15. 'v1.0-e24fd090c02efcfecb4de8f4ff246fd5c75b48946fdf0ce26c59f91d0d90797b-cfa33fe60e8e34073c149323454383fc9005d25c9b4c502c2f063457ef65322eade065975001a0b4b4c591c5e1bd36a6e8f7e2d4fa8a9ec01c64c041e99530c2-07b9efe0acd78c82c8d9c690aacb8656d81c369246d7f996a205fe3c18e9254a',
  16. $headers['X-Auth-User-Service-Key']
  17. );
  18. $this->assertCount(1, $headers);
  19. }
  20. }