Skip to content

Commit

Permalink
Use phpunit Attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
danny50610 committed May 18, 2024
1 parent cb2f256 commit ad0176c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/EncodingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Danny50610\BpeTokeniser\Encoding;
use Danny50610\BpeTokeniser\EncodingFactory;
use InvalidArgumentException;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use ValueError;

Expand Down Expand Up @@ -46,9 +47,7 @@ public function testMaxToeknMismatch()
new Encoding('test', $mergeableRanks, '', ['c' => 10], 3);
}

/**
* @dataProvider textDataProvider
*/
#[DataProvider('textDataProvider')]
public function testEncodeAndDecode($encodingName, $testCaseList)
{
$enc = EncodingFactory::createByEncodingName($encodingName);
Expand Down Expand Up @@ -124,9 +123,7 @@ public static function textDataProvider()
];
}

/**
* @dataProvider specialDataProvider
*/
#[DataProvider('specialDataProvider')]
public function testEncodeWithSpecial($encodingName, $testCaseList)
{
$enc = EncodingFactory::createByEncodingName($encodingName);
Expand Down

0 comments on commit ad0176c

Please sign in to comment.