ApiResponseTest::testSuccessResponse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
namespace Kineo\Test;
3
	
4
use Symfony\Component\HttpFoundation\Response;
5
use Kineo\Component\ApiResponse;
6
7
class ApiResponseTest extends \PHPUnit_Framework_TestCase
8
{
9
	public function testErrorResponse()
10
	{
11
		$response = ApiResponse::error('NO_CANDIDATES_FOUND');
12
		
13
		$this->assertInstanceOf('Symfony\Component\HttpFoundation\Response', $response);
14
	}
15
	
16
	public function testSuccessResponse()
17
	{
18
		$response = ApiResponse::success('DEFAULT_RESPONSE_SUCCESS');
19
		
20
		$this->assertInstanceOf('Symfony\Component\HttpFoundation\Response', $response);
21
	}
22
}
23