GraphqlControllerTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 7
dl 0
loc 12
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testQuery() 0 10 1
1
<?php
2
3
class GraphqlControllerTest extends AimeosTestAbstract
4
{
5
	public function testQuery()
6
	{
7
		$params = ['site' => 'unittest'];
8
		$body = '{"query":"query {\n  findProduct(code: \"CNC\") {\n    id\n    code\n  }\n}\n","variables":{},"operationName":null}';
9
		$response = $this->action( 'POST', '\Aimeos\Shop\Controller\GraphqlController@indexAction', $params, [], [], [], [], $body );
10
11
		$json = json_decode( $response->getContent(), true );
12
13
		$this->assertResponseOk();
14
		$this->assertNotNull( $json );
15
	}
16
}
17