CancelReservationTest::testSuccess()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 11

Duplication

Lines 18
Ratio 100 %

Importance

Changes 0
Metric Value
dl 18
loc 18
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 11
nc 1
nop 0
1
<?php
2
3
namespace HelePartnerSyncApi\Method;
4
5
use DateTime;
6
7
class CancelReservationTest extends MethodTestCase
8
{
9
10 View Code Duplication
	public function testSuccess()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
11
	{
12
		$startDateTime = new DateTime('+1 hour');
13
		$endDateTime = new DateTime('+2 hours');
14
		$request = $this->getRequestMock(array(
15
			'startDateTime' => $startDateTime->format(DateTime::W3C),
16
			'endDateTime' => $endDateTime->format(DateTime::W3C),
17
			'quantity' => 1,
18
			'parameters' => array(),
19
		));
20
21
		$method = new CancelReservation(function () {
22
			// no action
23
		});
24
		$response = $method->call($request);
25
26
		$this->assertNull($response);
27
	}
28
29
}
30