This PR moves the JSON API responses used in the tests to fixture files within the tests folder. This allows reuse and the ability to lint/validate these fixtures if required - although not covered in this PR. I've added TestCase::getPsr7StreamForFixture and TestCase::getPsr7JsonResponseForFixture to reduce code duplication and enable some assertions around the expected fixures/responses. Thanks,
21 lines
342 B
PHP
21 lines
342 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: junade
|
|
* Date: 04/09/2017
|
|
* Time: 20:08
|
|
*/
|
|
|
|
use Cloudflare\API\Auth\None;
|
|
|
|
class NoneTest extends TestCase
|
|
{
|
|
public function testGetHeaders()
|
|
{
|
|
$auth = new \Cloudflare\API\Auth\None();
|
|
$headers = $auth->getHeaders();
|
|
|
|
$this->assertEquals([], $headers);
|
|
}
|
|
}
|