Conditions | 1 |
Paths | 1 |
Total Lines | 25 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function testFactoryProcessesWithoutErrors() |
||
17 | { |
||
18 | $serviceLocator = $this->getMock('Zend\ServiceManager\ServiceLocatorInterface'); |
||
19 | $services = [ |
||
20 | 'AcMailer\Service\MailService' => $this->getMock('AcMailer\Service\MailServiceInterface'), |
||
21 | 'JhHubBase\Options\ModuleOptions' => new ModuleOptions |
||
22 | ]; |
||
23 | |||
24 | $serviceLocator |
||
25 | ->expects($this->any()) |
||
26 | ->method('get') |
||
27 | ->will( |
||
28 | $this->returnCallback( |
||
29 | function ($serviceName) use ($services) { |
||
30 | return $services[$serviceName]; |
||
31 | } |
||
32 | ) |
||
33 | ); |
||
34 | |||
35 | $factory = new MissedBookingEmailNotificationHandlerFactory(); |
||
36 | $this->assertInstanceOf( |
||
37 | 'JhFlexiTime\NotificationHandler\MissedBookingEmailNotificationHandler', |
||
38 | $factory->createService($serviceLocator) |
||
39 | ); |
||
40 | } |
||
41 | } |
||
42 |