Skip to content

Commit a360e3c

Browse files
committed
minor #7855 [PhpUnitBridge] use namespaced PHPUnit TestCase class (xabbuh)
This PR was merged into the 3.2 branch. Discussion ---------- [PhpUnitBridge] use namespaced PHPUnit TestCase class Commits ------- 3c9588e use namespaced PHPUnit TestCase class
2 parents 107f2e6 + 3c9588e commit a360e3c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

components/phpunit_bridge.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,10 @@ Use Case
183183

184184
If you have this kind of time-related tests::
185185

186+
use PHPUnit\Framework\TestCase;
186187
use Symfony\Component\Stopwatch\Stopwatch;
187188

188-
class MyTest extends \PHPUnit_Framework_TestCase
189+
class MyTest extends TestCase
189190
{
190191
public function testSomething()
191192
{
@@ -238,12 +239,13 @@ following listener in your PHPUnit configuration:
238239
As a result, the following is guaranteed to work and is no longer a transient
239240
test::
240241

242+
use PHPUnit\Framework\TestCase;
241243
use Symfony\Component\Stopwatch\Stopwatch;
242244

243245
/**
244246
* @group time-sensitive
245247
*/
246-
class MyTest extends \PHPUnit_Framework_TestCase
248+
class MyTest extends TestCase
247249
{
248250
public function testSomething()
249251
{
@@ -294,9 +296,10 @@ Use Case
294296
Consider the following example that uses the ``checkMX`` option of the ``Email``
295297
constraint to test the validity of the email domain::
296298

299+
use PHPUnit\Framework\TestCase;
297300
use Symfony\Component\Validator\Constraints\Email;
298301

299-
class MyTest extends \PHPUnit_Framework_TestCase
302+
class MyTest extends TestCase
300303
{
301304
public function testEmail()
302305
{
@@ -312,12 +315,13 @@ In order to avoid making a real network connection, add the ``@dns-sensitive``
312315
annotation to the class and use the ``DnsMock::withMockedHosts()`` to configure
313316
the data you expect to get for the given hosts::
314317

318+
use PHPUnit\Framework\TestCase;
315319
use Symfony\Component\Validator\Constraints\Email;
316320

317321
/**
318322
* @group dns-sensitive
319323
*/
320-
class MyTest extends \PHPUnit_Framework_TestCase
324+
class MyTest extends TestCase
321325
{
322326
public function testEmails()
323327
{

0 commit comments

Comments
 (0)