Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pelmered committed Jan 5, 2024
1 parent 2122ebb commit 01a8059
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 27 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
"filament/support": "^3.0",
"moneyphp/money": "^4.0"
},
"require-dev": {
"phpunit/phpunit": "^10",
"filament/filament": "^3.0"
},
"extra": {
"laravel": {
"providers": [
"Pelmered\\FilamentMoneyField\\FilamentMoneyFieldServiceProvider"
]
}
},
"require-dev": {
"phpunit/phpunit": "^10",
"filament/filament": "^3.0"
}
}
22 changes: 0 additions & 22 deletions phpunit.xml

This file was deleted.

7 changes: 6 additions & 1 deletion tests/MoneyFormatterTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php declare(strict_types=1);
<?php

namespace Pelmered\FilamentMoneyField\Tests;
use Money\Currency;
use Pelmered\FilamentMoneyField\MoneyFormatter;
use PHPUnit\Framework;

final class MoneyFormatterTest extends TestCase
{
Expand Down Expand Up @@ -44,8 +45,10 @@ public static function provideMoneyDataUSD(): array


/**
* @covers MoneyFormatter::format
* @dataProvider provideMoneyDataSEK
*/
#[Framework\CoversClass(MoneyFormatter::class)]
public function testMoneyFormatterSEK( string $expectedOutput, mixed $input)
{
self::assertSame(
Expand All @@ -55,8 +58,10 @@ public function testMoneyFormatterSEK( string $expectedOutput, mixed $input)
}

/**
* @covers MoneyFormatter::format
* @dataProvider provideMoneyDataUSD
*/
#[Framework\CoversClass(MoneyFormatter::class)]
public function testMoneyFormatterUSD( string $expectedOutput, mixed $input)
{
self::assertSame(
Expand Down

0 comments on commit 01a8059

Please sign in to comment.