|
@@ 31-41 (lines=11) @@
|
| 28 |
|
$this->assertInstanceOf('IrishDan\NotificationBundle\Message\MessageInterface', $message); |
| 29 |
|
} |
| 30 |
|
|
| 31 |
|
public function testDispatch() |
| 32 |
|
{ |
| 33 |
|
$message = $this->getTestMessage(); |
| 34 |
|
|
| 35 |
|
$adapter = $this->getMockAdapter(false, true); |
| 36 |
|
$this->DirectChannel->setAdapter($adapter); |
| 37 |
|
|
| 38 |
|
$dispatched = $this->DirectChannel->dispatch($message); |
| 39 |
|
|
| 40 |
|
$this->assertTrue($dispatched); |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
public function testFormatAndDispatch() |
| 44 |
|
{ |
|
@@ 43-51 (lines=9) @@
|
| 40 |
|
$this->assertTrue($dispatched); |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
public function testFormatAndDispatch() |
| 44 |
|
{ |
| 45 |
|
$formatter = $this->getMockAdapter(true, true); |
| 46 |
|
$this->DirectChannel->setAdapter($formatter); |
| 47 |
|
|
| 48 |
|
$dispatched = $this->DirectChannel->formatAndDispatch($this->notification); |
| 49 |
|
|
| 50 |
|
$this->assertTrue($dispatched); |
| 51 |
|
} |
| 52 |
|
} |
| 53 |
|
|