Files
Phraseanet/tests/Alchemy/Tests/Phrasea/CLITest.php
2015-06-15 19:30:51 +02:00

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');
}
}