Initial commit, WIP.

This commit is contained in:
Junade Ali
2017-01-13 23:52:27 +00:00
commit a49c655e77
13 changed files with 2150 additions and 0 deletions

24
tests/Auth/APIKeyTest.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
/**
* User: junade
* Date: 13/01/2017
* Time: 17:15
*/
class APIKeyTest extends PHPUnit_Framework_TestCase
{
public function testGetHeaders()
{
$auth = new \Cloudflare\API\Auth\APIKey('example@example.com', '1234567893feefc5f0q5000bfo0c38d90bbeb');
$headers = $auth->getHeaders();
$this->assertArrayHasKey('X-Auth-Key', $headers);
$this->assertArrayHasKey('X-Auth-Email', $headers);
$this->assertEquals('example@example.com', $headers['X-Auth-Email']);
$this->assertEquals('1234567893feefc5f0q5000bfo0c38d90bbeb', $headers['X-Auth-Key']);
$this->assertEquals(2, sizeof($headers));
}
}