Completed
Push — dev ( ce9639...c420bb )
by Josef
04:04
created

MethodTestCase   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getRequestMock() 0 12 1
1
<?php
2
3
namespace HelePartnerSyncApi\Method;
4
5
use HelePartnerSyncApi\Request\Request;
6
use PHPUnit_Framework_TestCase;
7
8
abstract class MethodTestCase extends PHPUnit_Framework_TestCase
9
{
10
11
	/**
12
	 * @param mixed $dataToReturn
13
	 * @return Request
14
	 */
15
	protected function getRequestMock($dataToReturn)
16
	{
17
		$request = $this->getMockBuilder('HelePartnerSyncApi\Request\Request')
18
			->disableOriginalConstructor()
19
			->getMock();
20
21
		$request->expects(self::once())
22
			->method('getData')
23
			->willReturn($dataToReturn);
24
25
		return $request;
26
	}
27
28
}
29