Skip to content

Commit f476099

Browse files
committed
Create test for HttpFactory::makeResponse()
1 parent bbaae13 commit f476099

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Redmine\Tests\Unit\Http\HttpFactory;
6+
7+
use PHPUnit\Framework\TestCase;
8+
use Redmine\Http\HttpFactory;
9+
use Redmine\Http\Response;
10+
11+
/**
12+
* @covers \Redmine\Http\HttpFactory::makeResponse
13+
*/
14+
class MakeResponseTest extends TestCase
15+
{
16+
public function testMakeResponse()
17+
{
18+
$response = HttpFactory::makeResponse(200, 'application/json', 'content');
19+
20+
$this->assertInstanceOf(Response::class, $response);
21+
$this->assertSame(200, $response->getStatusCode());
22+
$this->assertSame('application/json', $response->getContentType());
23+
$this->assertSame('content', $response->getContent());
24+
}
25+
}

0 commit comments

Comments
 (0)