Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Blair2004 committed Apr 21, 2024
1 parent c6d2844 commit 0f7758f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/Traits/WithTaxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ private function assertCheck( $details, ?callable $callback = null )
$expectedTax = $taxService->getComputedTaxGroupValue( $order[ 'tax_type' ], $order[ 'tax_group_id' ], ns()->currency->define( $order[ 'subtotal' ] )->subtractBy( $order[ 'discount' ] )->getRaw() );

if ( $callback === null ) {
$this->assertEquals( (float) $expectedTax, (float) $order[ 'tax_value' ], __( 'The computed taxes aren\'t correct.' ) );
$this->assertEquals(
ns()->currency->define( $expectedTax )->toFloat(),
ns()->currency->define( $order[ 'tax_value' ] )->toFloat(),
__( 'The computed taxes aren\'t correct.' )
);
} else {
$callback( $order );
}
Expand Down

0 comments on commit 0f7758f

Please sign in to comment.