|
@@ 166-175 (lines=10) @@
|
| 163 |
|
* @param \DateTime $time2 the end time of the second entity |
| 164 |
|
* @param int $expectedResult the expected result of the method |
| 165 |
|
*/ |
| 166 |
|
public function testCompareEntityTimesWithoutStartTimes(\DateTime $time1, \DateTime $time2, int $expectedResult) |
| 167 |
|
{ |
| 168 |
|
$service = $this->createComparer(); |
| 169 |
|
$entity1 = $this->createTreeStructureEntity('e1', ['getEndTime' => $time1]); |
| 170 |
|
$entity2 = $this->createTreeStructureEntity('e2', ['getEndTime' => $time2]); |
| 171 |
|
|
| 172 |
|
/** @noinspection PhpUnhandledExceptionInspection */ |
| 173 |
|
$result = self::getMethod(get_class($service), 'compareEntityTimes')->invokeArgs($service, [$entity1, $entity2]); |
| 174 |
|
self::assertEquals($expectedResult, $result); |
| 175 |
|
} |
| 176 |
|
|
| 177 |
|
/** @noinspection PhpDocMissingThrowsInspection */ //ReflectionException |
| 178 |
|
/** |
|
@@ 212-223 (lines=12) @@
|
| 209 |
|
* @param mixed $localIdentifier2 the local identifier of entity2 |
| 210 |
|
* @param int $expectedResult the expected result of the method |
| 211 |
|
*/ |
| 212 |
|
public function testCompareLocalIdentifiersWithinTournamentOneLevel($localIdentifier1, $localIdentifier2, |
| 213 |
|
int $expectedResult) |
| 214 |
|
{ |
| 215 |
|
$service = $this->createComparer(); |
| 216 |
|
$entity1 = $this->createTreeStructureEntity('e1', ['getLocalIdentifier' => $localIdentifier1]); |
| 217 |
|
$entity2 = $this->createTreeStructureEntity('e2', ['getLocalIdentifier' => $localIdentifier2]); |
| 218 |
|
|
| 219 |
|
/** @noinspection PhpUnhandledExceptionInspection */ |
| 220 |
|
$result = self::getMethod(get_class($service), 'compareLocalIdentifiersWithinTournament') |
| 221 |
|
->invokeArgs($service, [$entity1, $entity2]); |
| 222 |
|
self::assertEquals($expectedResult, $result); |
| 223 |
|
} |
| 224 |
|
|
| 225 |
|
/** @noinspection PhpDocMissingThrowsInspection */ //ReflectionException |
| 226 |
|
/** |