wp-pay-gateways /
ideal-basic
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Pronamic\WordPress\Pay\Gateways\IDealBasic; |
||
| 4 | |||
| 5 | use Pronamic\WordPress\Money\Money; |
||
| 6 | |||
| 7 | class ItemsTest extends \WP_UnitTestCase { |
||
|
0 ignored issues
–
show
|
|||
| 8 | /** |
||
| 9 | * Test item. |
||
| 10 | */ |
||
| 11 | public function test_item() { |
||
| 12 | $items = new Items(); |
||
| 13 | |||
| 14 | $item1 = new Item( '1', '1 Item of € 1,-', 1, new Money( 1 ) ); |
||
| 15 | $item2 = new Item( '2', '1 Item of € 2,-', 1, new Money( 2 ) ); |
||
| 16 | $item3 = new Item( '3', '2 Items of € 5,-', 2, new Money( 5 ) ); |
||
| 17 | |||
| 18 | $items->add_item( $item1 ); |
||
| 19 | $items->add_item( $item2 ); |
||
| 20 | $items->add_item( $item3 ); |
||
| 21 | |||
| 22 | // 13 = 1 + 2 + ( 2 x 5 ) |
||
| 23 | $expected = 13; |
||
| 24 | $amount = $items->get_amount()->get_value(); |
||
| 25 | |||
| 26 | $this->assertEquals( $expected, $amount ); |
||
| 27 | } |
||
| 28 | } |
||
| 29 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths