ApiResponseTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 2
c 2
b 0
f 1
lcom 0
cbo 2
dl 0
loc 16
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testErrorResponse() 0 6 1
A testSuccessResponse() 0 6 1
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