File: /virtual/nagasaki/public_html/ec/tests/Eccube/Tests/Application/TranslationTraitTest.php
<?php
/*
* This file is part of the Silex framework.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Eccube\Tests\Application;
use Eccube\Tests\EccubeTestCase;
/**
* TranslationTrait test cases.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @requires PHP 5.4
*/
class TranslationTraitTest extends EccubeTestCase
{
public function testTrans()
{
$app = $this->app;
$app['translator'] = $translator = $this->getMockBuilder('Symfony\Component\Translation\Translator')->disableOriginalConstructor()->getMock();
$translator->expects($this->once())->method('trans');
$app->trans('foo');
}
public function testTransChoice()
{
$app = $this->app;
$app['translator'] = $translator = $this->getMockBuilder('Symfony\Component\Translation\Translator')->disableOriginalConstructor()->getMock();
$translator->expects($this->once())->method('transChoice');
$app->transChoice('foo', 2);
}
}