mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 21:13:26 +00:00
29 lines
775 B
PHP
29 lines
775 B
PHP
<?php
|
|
|
|
namespace Alchemy\Tests\Phrasea;
|
|
|
|
use Alchemy\Phrasea\CLI;
|
|
|
|
class CLITest extends \PhraseanetPHPUnitAbstract
|
|
{
|
|
public function testsEmailWithoutQueue()
|
|
{
|
|
$app = new CLI('Phrasea');
|
|
|
|
$spool = $this->getMock('Swift_Spool');
|
|
$spool->expects($this->once())
|
|
->method('flushQueue')
|
|
->with($this->isInstanceOf('Swift_Transport'));
|
|
|
|
$app['swiftmailer.spooltransport'] = $this->getMockBuilder('Swift_SpoolTransport')
|
|
->disableOriginalConstructor()
|
|
->getMock();
|
|
|
|
$app['swiftmailer.spooltransport']->expects($this->once())
|
|
->method('getSpool')
|
|
->will($this->returnValue($spool));
|
|
|
|
$app['dispatcher']->dispatch('phraseanet.notification.sent');
|
|
}
|
|
}
|