File: /virtual/nagasaki/public_html/ec/tests/Eccube/Tests/Application/UrlGeneratorTraitTest.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;
/**
* UrlGeneratorTrait test cases.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @requires PHP 5.4
*/
class UrlGeneratorTraitTest extends EccubeTestCase
{
public function testUrl()
{
$app = $this->app;
$app['url_generator'] = $translator = $this->getMockBuilder('Symfony\Component\Routing\Generator\UrlGeneratorInterface')->disableOriginalConstructor()->getMock();
$translator->expects($this->once())->method('generate')->with('foo', array(), true);
$app->url('foo');
}
public function testPath()
{
$app = $this->app;
$app['url_generator'] = $translator = $this->getMockBuilder('Symfony\Component\Routing\Generator\UrlGeneratorInterface')->disableOriginalConstructor()->getMock();
$translator->expects($this->once())->method('generate')->with('foo', array(), false);
$app->path('foo');
}
}