Merge pull request #101 from ProfiCloS/feature/api-token
feature/api-token
This commit is contained in:
21
tests/Auth/APITokenTest.php
Normal file
21
tests/Auth/APITokenTest.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* User: czPechy
|
||||
* Date: 30/07/2018
|
||||
* Time: 23:25
|
||||
*/
|
||||
class APITokenTest extends TestCase
|
||||
{
|
||||
public function testGetHeaders()
|
||||
{
|
||||
$auth = new \Cloudflare\API\Auth\APIToken('zKq9RDO6PbCjs6PRUXF3BoqFi3QdwY36C2VfOaRy');
|
||||
$headers = $auth->getHeaders();
|
||||
|
||||
$this->assertArrayHasKey('Authorization', $headers);
|
||||
|
||||
$this->assertEquals('Bearer zKq9RDO6PbCjs6PRUXF3BoqFi3QdwY36C2VfOaRy', $headers['Authorization']);
|
||||
|
||||
$this->assertCount(1, $headers);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user