1010
1111use Greenter \Data \Generator \InvoiceDiscountStore ;
1212use Greenter \Data \Generator \InvoiceFullStore ;
13+ use Greenter \Data \Generator \InvoiceIcbperStore ;
1314use Greenter \Data \Generator \InvoiceIvapStore ;
1415use Greenter \Model \Sale \Invoice ;
1516use Tests \Greenter \Xml \Builder \FeBuilderTrait ;
@@ -33,21 +34,24 @@ public function testGenerate()
3334 $ this ->assertSchema ($ xml );
3435 }
3536
36- public function testInvoiceWithDiscount ()
37+ /**
38+ * @dataProvider storeProvider
39+ */
40+ public function testBuilder ($ invoiceClass )
3741 {
38- $ invoice = $ this ->createDocument (InvoiceDiscountStore::class );
42+ $ invoice = $ this ->createDocument ($ invoiceClass );
3943
4044 $ xml = $ this ->build ($ invoice );
4145 $ this ->assertNotEmpty ($ xml );
4246 $ this ->assertSchema ($ xml );
4347 }
4448
45- public function testInvoiceIvap ()
49+ public function storeProvider ()
4650 {
47- $ invoice = $ this -> createDocument (InvoiceIvapStore::class);
48-
49- $ xml = $ this -> build ( $ invoice );
50- $ this -> assertNotEmpty ( $ xml );
51- $ this -> assertSchema ( $ xml ) ;
51+ return [
52+ [InvoiceDiscountStore::class],
53+ [InvoiceIvapStore::class],
54+ [InvoiceIcbperStore::class]
55+ ] ;
5256 }
5357}
0 commit comments