Total Complexity | 3 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class NotificationEntityFactoryTest extends TestCase |
||
14 | { |
||
15 | /** |
||
16 | * @return void |
||
17 | * @throws UnknownServiceException |
||
18 | */ |
||
19 | public function testCreatesNotifableTelegramChannelForTelegramService() |
||
20 | { |
||
21 | $factory = new NotificationEntityFactory(Services::SERVICE_TELEGRAM); |
||
22 | $entity = $factory->create(); |
||
23 | |||
24 | $this->assertInstanceOf(NotifableTelegramChannel::class, $entity); |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @return void |
||
29 | * @throws UnknownServiceException |
||
30 | */ |
||
31 | public function testThrowsExceptionForUnknownService() |
||
32 | { |
||
33 | $this->expectException(UnknownServiceException::class); |
||
34 | |||
35 | $factory = new NotificationEntityFactory('wtf?'); |
||
36 | $factory->create(); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param Application $app |
||
41 | * @return class-string[] |
||
|
|||
42 | */ |
||
43 | protected function getPackageProviders($app): array |
||
47 | ]; |
||
48 | } |
||
49 | } |
||
50 |