for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Symfony-Util package.
*
* (c) Jean-Bernard Addor
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use PHPUnit\Framework\TestCase;
// use Symfony\Bundle\TwigBundle\TwigEngine;
use Symfony\Bridge\Twig\TwigEngine;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Templating\TemplateNameParser;
use SymfonyUtil\Controller\EngineAsArgumentController;
/**
* @covers \SymfonyUtil\Controller\EngineAsArgumentController
final class EngineAsArgumentControllerTest extends TestCase
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
public function testCanBeCreated()
$this->assertInstanceOf(
EngineAsArgumentController::class,
new EngineAsArgumentController()
);
}
public function testReturnsResponse()
Response::class,
(new EngineAsArgumentController())(new TwigEngine(
new Twig_Environment(new Twig_Loader_Array(['index.html.twig' => 'Hello World!'])),
new TemplateNameParser
))
// http://api.symfony.com/3.3/Symfony/Bundle/TwigBundle/TwigEngine.html
// http://api.symfony.com/3.3/Symfony/Bridge/Twig/TwigEngine.html
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.