@@ -183,9 +183,10 @@ Use Case
183
183
184
184
If you have this kind of time-related tests::
185
185
186
+ use PHPUnit\Framework\TestCase;
186
187
use Symfony\Component\Stopwatch\Stopwatch;
187
188
188
- class MyTest extends \PHPUnit_Framework_TestCase
189
+ class MyTest extends TestCase
189
190
{
190
191
public function testSomething()
191
192
{
@@ -238,12 +239,13 @@ following listener in your PHPUnit configuration:
238
239
As a result, the following is guaranteed to work and is no longer a transient
239
240
test::
240
241
242
+ use PHPUnit\Framework\TestCase;
241
243
use Symfony\Component\Stopwatch\Stopwatch;
242
244
243
245
/**
244
246
* @group time-sensitive
245
247
*/
246
- class MyTest extends \PHPUnit_Framework_TestCase
248
+ class MyTest extends TestCase
247
249
{
248
250
public function testSomething()
249
251
{
@@ -294,9 +296,10 @@ Use Case
294
296
Consider the following example that uses the ``checkMX `` option of the ``Email ``
295
297
constraint to test the validity of the email domain::
296
298
299
+ use PHPUnit\Framework\TestCase;
297
300
use Symfony\Component\Validator\Constraints\Email;
298
301
299
- class MyTest extends \PHPUnit_Framework_TestCase
302
+ class MyTest extends TestCase
300
303
{
301
304
public function testEmail()
302
305
{
@@ -312,12 +315,13 @@ In order to avoid making a real network connection, add the ``@dns-sensitive``
312
315
annotation to the class and use the ``DnsMock::withMockedHosts() `` to configure
313
316
the data you expect to get for the given hosts::
314
317
318
+ use PHPUnit\Framework\TestCase;
315
319
use Symfony\Component\Validator\Constraints\Email;
316
320
317
321
/**
318
322
* @group dns-sensitive
319
323
*/
320
- class MyTest extends \PHPUnit_Framework_TestCase
324
+ class MyTest extends TestCase
321
325
{
322
326
public function testEmails()
323
327
{
0 commit comments