Skip to content

Commit f2ab1a6

Browse files
committed
test: add assert() for rector errors
1 parent 6d958f6 commit f2ab1a6

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/system/CommonSingleServiceTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ public function testSingleServiceWithNoParamsSupplied(string $service): void
3636
$service1 = single_service($service);
3737
$service2 = single_service($service);
3838

39+
assert($service1 !== null);
40+
assert($service1 !== null);
41+
3942
$this->assertInstanceOf(get_class($service1), $service2);
4043
$this->assertNotSame($service1, $service2);
4144
}
@@ -64,6 +67,9 @@ public function testSingleServiceWithAtLeastOneParamSupplied(string $service): v
6467
$service1 = single_service($service, ...$params);
6568
$service2 = single_service($service, ...$params);
6669

70+
assert($service1 !== null);
71+
assert($service1 !== null);
72+
6773
$this->assertInstanceOf(get_class($service1), $service2);
6874
$this->assertNotSame($service1, $service2);
6975

@@ -77,6 +83,9 @@ public function testSingleServiceWithAllParamsSupplied(): void
7783
$cache1 = single_service('cache', null, true);
7884
$cache2 = single_service('cache', null, true);
7985

86+
assert($cache1 !== null);
87+
assert($cache2 !== null);
88+
8089
// Assert that even passing true as last param this will
8190
// not create a shared instance.
8291
$this->assertInstanceOf(get_class($cache1), $cache2);

0 commit comments

Comments
 (0)