Skip to content

Commit aeadcf5

Browse files
committed
Fix PHPUnit Deprecations
1 parent 51c31f7 commit aeadcf5

File tree

1 file changed

+11
-30
lines changed

1 file changed

+11
-30
lines changed

test/ZipStreamTest.php

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use GuzzleHttp\Psr7\Response;
99
use GuzzleHttp\Psr7\StreamWrapper;
1010
use org\bovigo\vfs\vfsStream;
11+
use PHPUnit\Framework\Attributes\Group;
1112
use PHPUnit\Framework\TestCase;
1213
use Psr\Http\Message\StreamInterface;
1314
use RuntimeException;
@@ -423,9 +424,7 @@ public function testAddFileFromPsr7Stream(): void
423424
$this->assertStringEqualsFile($tmpDir . '/sample.json', $body);
424425
}
425426

426-
/**
427-
* @group slow
428-
*/
427+
#[Group('slow')]
429428
public function testAddLargeFileFromPsr7Stream(): void
430429
{
431430
$zip = new ZipStream(
@@ -464,9 +463,7 @@ public function testContinueFinishedZip(): void
464463
$zip->addFile('sample.txt', '1234');
465464
}
466465

467-
/**
468-
* @group slow
469-
*/
466+
#[Group('slow')]
470467
public function testManyFilesWithoutZip64(): void
471468
{
472469
$this->expectException(OverflowException::class);
@@ -484,9 +481,7 @@ public function testManyFilesWithoutZip64(): void
484481
$zip->finish();
485482
}
486483

487-
/**
488-
* @group slow
489-
*/
484+
#[Group('slow')]
490485
public function testManyFilesWithZip64(): void
491486
{
492487
$zip = new ZipStream(
@@ -508,9 +503,7 @@ public function testManyFilesWithZip64(): void
508503
$this->assertSame(count($files), 0x10000);
509504
}
510505

511-
/**
512-
* @group slow
513-
*/
506+
#[Group('slow')]
514507
public function testLongZipWithout64(): void
515508
{
516509
$this->expectException(OverflowException::class);
@@ -533,9 +526,7 @@ public function testLongZipWithout64(): void
533526
}
534527
}
535528

536-
/**
537-
* @group slow
538-
*/
529+
#[Group('slow')]
539530
public function testLongZipWith64(): void
540531
{
541532
$zip = new ZipStream(
@@ -563,9 +554,7 @@ public function testLongZipWith64(): void
563554
$this->assertSame(['sample0', 'sample1', 'sample2', 'sample3'], $files);
564555
}
565556

566-
/**
567-
* @group slow
568-
*/
557+
#[Group('slow')]
569558
public function testAddLargeFileWithoutZip64WithZeroHeader(): void
570559
{
571560
$this->expectException(OverflowException::class);
@@ -586,9 +575,7 @@ public function testAddLargeFileWithoutZip64WithZeroHeader(): void
586575
);
587576
}
588577

589-
/**
590-
* @group slow
591-
*/
578+
#[Group('slow')]
592579
public function testAddsZip64HeaderWhenNeeded(): void
593580
{
594581
$zip = new ZipStream(
@@ -617,9 +604,7 @@ public function testAddsZip64HeaderWhenNeeded(): void
617604
));
618605
}
619606

620-
/**
621-
* @group slow
622-
*/
607+
#[Group('slow')]
623608
public function testDoesNotAddZip64HeaderWhenNotNeeded(): void
624609
{
625610
$zip = new ZipStream(
@@ -648,9 +633,7 @@ public function testDoesNotAddZip64HeaderWhenNotNeeded(): void
648633
));
649634
}
650635

651-
/**
652-
* @group slow
653-
*/
636+
#[Group('slow')]
654637
public function testAddLargeFileWithoutZip64WithoutZeroHeader(): void
655638
{
656639
$this->expectException(OverflowException::class);
@@ -1157,9 +1140,7 @@ public function testExecuteSimulationBeforeFinish(): void
11571140
$zip->executeSimulation();
11581141
}
11591142

1160-
/**
1161-
* @group slow
1162-
*/
1143+
#[Group('slow')]
11631144
public function testSimulationWithLargeZip64AndZeroHeader(): void
11641145
{
11651146
$zip = new ZipStream(

0 commit comments

Comments
 (0)