Skip to content

Commit 0f7758f

Browse files
committed
WIP
1 parent c6d2844 commit 0f7758f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/Traits/WithTaxTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,11 @@ private function assertCheck( $details, ?callable $callback = null )
188188
$expectedTax = $taxService->getComputedTaxGroupValue( $order[ 'tax_type' ], $order[ 'tax_group_id' ], ns()->currency->define( $order[ 'subtotal' ] )->subtractBy( $order[ 'discount' ] )->getRaw() );
189189

190190
if ( $callback === null ) {
191-
$this->assertEquals( (float) $expectedTax, (float) $order[ 'tax_value' ], __( 'The computed taxes aren\'t correct.' ) );
191+
$this->assertEquals(
192+
ns()->currency->define( $expectedTax )->toFloat(),
193+
ns()->currency->define( $order[ 'tax_value' ] )->toFloat(),
194+
__( 'The computed taxes aren\'t correct.' )
195+
);
192196
} else {
193197
$callback( $order );
194198
}

0 commit comments

Comments
 (0)