Actualización

This commit is contained in:
Xes
2025-04-10 12:24:57 +02:00
parent 8969cc929d
commit 45420b6f0d
39760 changed files with 4303286 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
<?php
/**
* This file is part of cocur/slugify.
*
* (c) Florian Eckerstorfer <florian@eckerstorfer.co>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cocur\Slugify\Tests\Bridge\Silex;
use Cocur\Slugify\Bridge\Silex\SlugifyServiceProvider;
use Cocur\Slugify\Bridge\Twig\SlugifyExtension;
use Silex\Application;
use Silex\Provider\TwigServiceProvider;
/**
* SlugifyServiceProviderTest
*
* @category test
* @package cocur/slugify
* @subpackage bridge
* @author Florian Eckerstorfer <florian@eckerstorfer.co>
* @copyright 2012-2014 Florian Eckerstorfer
* @license http://www.opensource.org/licenses/MIT The MIT License
* @group unit
*/
class SlugifySilexProviderTest extends \PHPUnit_Framework_TestCase
{
/**
* @test
* @covers Cocur\Slugify\Bridge\Silex\SlugifyServiceProvider
*/
public function register()
{
// it seems like Application is not mockable.
$app = new Application();
$app->register(new SlugifyServiceProvider());
$app->boot();
$this->assertArrayHasKey('slugify', $app);
$this->assertArrayHasKey('slugify.provider', $app);
$this->assertArrayHasKey('slugify.options', $app);
$this->assertInstanceOf('Cocur\Slugify\Slugify', $app['slugify']);
}
/**
* @test
*/
public function registerWithTwig()
{
$app = new Application();
$app->register(new TwigServiceProvider());
$app->register(new SlugifyServiceProvider());
$this->assertTrue($app['twig']->hasExtension(SlugifyExtension::class));
}
}