Skip to content

Commit

Permalink
support phpunit ^11.0, change docblocks to attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Li committed Aug 1, 2024
1 parent 5633347 commit ca51966
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"require": {
"covergenius/php-vcr": "^1.7",
"php": "^8.1",
"phpunit/phpunit": "^10.4 | ^11"
"phpunit/phpunit": "^10.4||^11.0"
},
"scripts": {
"test": [
Expand Down
9 changes: 4 additions & 5 deletions tests/VCRTestListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

namespace Tests\VCR\PHPUnit\TestListener;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;

final class VCRTestListenerTest extends TestCase
Expand All @@ -28,9 +30,8 @@ public function testInterceptsWithAnnotationsAndFileExtension(): void

/**
* @vcr unittest_annotation_test
*
* @dataProvider dummyDataProvider
*/
#[DataProvider('dummyDataProvider')]
public function testInterceptsWithAnnotationsWhenUsingDataProvider(int $dummyValue): void
{
// Content of tests/fixtures/unittest_annotation_test: "This is an annotation test dummy".
Expand All @@ -40,9 +41,7 @@ public function testInterceptsWithAnnotationsWhenUsingDataProvider(int $dummyVal
$this->assertEquals('This is a annotation test dummy.', $result, 'Call was not intercepted (using annotations with data provider).');
}

/**
* @group https://github.com/php-vcr/phpunit-testlistener-vcr/issues/29
*/
#[Group('https://github.com/php-vcr/phpunit-testlistener-vcr/issues/29')]
public function testNoVcrAnnotationRunsSuccessfulAndDoesNotProduceWarnings()
{
$this->assertTrue(true, 'just adding an assertion here');
Expand Down

0 comments on commit ca51966

Please sign in to comment.