mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
33 lines
814 B
PHP
33 lines
814 B
PHP
<?php
|
|
|
|
namespace Alchemy\Tests\Phrasea;
|
|
|
|
use Alchemy\Phrasea\CLI;
|
|
|
|
/**
|
|
* @group functional
|
|
* @group legacy
|
|
*/
|
|
class CLITest extends \PhraseanetTestCase
|
|
{
|
|
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');
|
|
}
|
|
}
|