| @@ 137-149 (lines=13) @@ | ||
| 134 | $this->assertEquals($options['file_options']['callback'], $transport->getOptions()->getCallback()); |
|
| 135 | } |
|
| 136 | ||
| 137 | public function testAdapterAsService() |
|
| 138 | { |
|
| 139 | $this->initServiceLocator([ |
|
| 140 | 'mail_adapter' => 'my_transport_service' |
|
| 141 | ]); |
|
| 142 | $transport = new Sendmail(); |
|
| 143 | $this->serviceLocator->set('my_transport_service', $transport); |
|
| 144 | $mailService = $this->mailServiceFactory->__invoke( |
|
| 145 | $this->serviceLocator, |
|
| 146 | 'acmailer.mailservice.default' |
|
| 147 | ); |
|
| 148 | $this->assertSame($transport, $mailService->getTransport()); |
|
| 149 | } |
|
| 150 | ||
| 151 | /** |
|
| 152 | * @expectedException \AcMailer\Exception\InvalidArgumentException |
|
| @@ 180-191 (lines=12) @@ | ||
| 177 | ); |
|
| 178 | } |
|
| 179 | ||
| 180 | public function testAdapterAsInstance() |
|
| 181 | { |
|
| 182 | $expected = new Sendmail(); |
|
| 183 | $this->initServiceLocator([ |
|
| 184 | 'mail_adapter' => $expected |
|
| 185 | ]); |
|
| 186 | $mailService = $this->mailServiceFactory->__invoke( |
|
| 187 | $this->serviceLocator, |
|
| 188 | 'acmailer.mailservice.default' |
|
| 189 | ); |
|
| 190 | $this->assertSame($expected, $mailService->getTransport()); |
|
| 191 | } |
|
| 192 | ||
| 193 | public function testViewRendererService() |
|
| 194 | { |
|