Skip to content

Commit

Permalink
fix phpunit deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmajor committed Mar 1, 2024
1 parent e3f0484 commit 390975d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions tests/HelpersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

use Generator;
use Major\PluralRules\Dev\Helpers as H;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

final class HelpersTest extends TestCase
{
/**
* @dataProvider provideStudlyCases
*
* @param list<string> $pieces
*/
#[DataProvider('provideStudlyCases')]
public function testStudlyHelperWorks(array $pieces, string $expected): void
{
$this->assertSame($expected, H\studly(...$pieces));
Expand All @@ -28,10 +28,9 @@ public static function provideStudlyCases(): Generator
}

/**
* @dataProvider provideCamelCases
*
* @param list<string> $pieces
*/
#[DataProvider('provideCamelCases')]
public function testCamelHelperWorks(array $pieces, string $expected): void
{
$this->assertSame($expected, H\camel(...$pieces));
Expand Down
5 changes: 2 additions & 3 deletions tests/OperandsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
namespace Major\PluralRules\Tests;

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

use function Major\PluralRules\Operands\{f, i, n, t, v, w};

final class OperandsTest extends TestCase
{
/**
* @dataProvider provideOperandCases
*/
#[DataProvider('provideOperandCases')]
public function testItCanComputeOperands(
string $source,
float $n,
Expand Down

0 comments on commit 390975d

Please sign in to comment.