Commit 63851cc6 authored by Fabien Potencier's avatar Fabien Potencier

use namespaced PHPUnit

parent 182ecf05
...@@ -26,10 +26,12 @@ PHPUnit ...@@ -26,10 +26,12 @@ PHPUnit
`PHPUnit <https://github.com/sebastianbergmann/phpunit>`_ is the de-facto `PHPUnit <https://github.com/sebastianbergmann/phpunit>`_ is the de-facto
standard testing framework for PHP. It was built for writing unit tests, but it standard testing framework for PHP. It was built for writing unit tests, but it
can be used for functional tests too. You write tests by creating a new class, can be used for functional tests too. You write tests by creating a new class,
that extends the ``PHPUnit_Framework_TestCase``. Your test cases are methods that extends the ``PHPUnit\Framework\TestCase``. Your test cases are methods
prefixed with ``test``:: prefixed with ``test``::
class ContactFormTest extends \PHPUnit_Framework_TestCase use PHPUnit\Framework\TestCase;
class ContactFormTest extends TestCase
{ {
public function testInitialPage() public function testInitialPage()
{ {
......
...@@ -17,8 +17,6 @@ use Monolog\Handler\TestHandler; ...@@ -17,8 +17,6 @@ use Monolog\Handler\TestHandler;
use Monolog\Logger; use Monolog\Logger;
/** /**
* MonologTrait test cases.
*
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*/ */
class MonologTraitTest extends TestCase class MonologTraitTest extends TestCase
......
...@@ -17,8 +17,6 @@ use Symfony\Component\Security\Core\User\User; ...@@ -17,8 +17,6 @@ use Symfony\Component\Security\Core\User\User;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
/** /**
* SecurityTrait test cases.
*
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*/ */
class SecurityTraitTest extends TestCase class SecurityTraitTest extends TestCase
......
...@@ -15,8 +15,6 @@ use PHPUnit\Framework\TestCase; ...@@ -15,8 +15,6 @@ use PHPUnit\Framework\TestCase;
use Silex\Provider\SwiftmailerServiceProvider; use Silex\Provider\SwiftmailerServiceProvider;
/** /**
* SwiftmailerTrait test cases.
*
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*/ */
class SwiftmailerTraitTest extends TestCase class SwiftmailerTraitTest extends TestCase
......
...@@ -15,8 +15,6 @@ use PHPUnit\Framework\TestCase; ...@@ -15,8 +15,6 @@ use PHPUnit\Framework\TestCase;
use Silex\Provider\TranslationServiceProvider; use Silex\Provider\TranslationServiceProvider;
/** /**
* TranslationTrait test cases.
*
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*/ */
class TranslationTraitTest extends TestCase class TranslationTraitTest extends TestCase
......
...@@ -17,8 +17,6 @@ use Symfony\Component\HttpFoundation\Response; ...@@ -17,8 +17,6 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\StreamedResponse; use Symfony\Component\HttpFoundation\StreamedResponse;
/** /**
* TwigTrait test cases.
*
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*/ */
class TwigTraitTest extends TestCase class TwigTraitTest extends TestCase
......
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
namespace Silex\Tests\Provider; namespace Silex\Tests\Provider;
use PHPUnit\Framework\TestCase;
use Monolog\Formatter\JsonFormatter; use Monolog\Formatter\JsonFormatter;
use Monolog\Handler\TestHandler; use Monolog\Handler\TestHandler;
use Monolog\Logger; use Monolog\Logger;
use PHPUnit\Framework\TestCase;
use Silex\Application; use Silex\Application;
use Silex\Provider\MonologServiceProvider; use Silex\Provider\MonologServiceProvider;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\RedirectResponse;
......
...@@ -35,8 +35,6 @@ class ValidatorServiceProviderTest extends TestCase ...@@ -35,8 +35,6 @@ class ValidatorServiceProviderTest extends TestCase
$app->register(new ValidatorServiceProvider()); $app->register(new ValidatorServiceProvider());
$app->register(new FormServiceProvider()); $app->register(new FormServiceProvider());
$this->assertInstanceOf('Symfony\Component\Validator\Validator\ValidatorInterface', $app['validator']);
return $app; return $app;
} }
...@@ -54,8 +52,6 @@ class ValidatorServiceProviderTest extends TestCase ...@@ -54,8 +52,6 @@ class ValidatorServiceProviderTest extends TestCase
], ],
]); ]);
$this->assertInstanceOf('Symfony\Component\Validator\Validator\ValidatorInterface', $app['validator']);
return $app; return $app;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment