@@ -26,14 +26,16 @@ class HookTest extends TestCase
2626
2727 $ connection ->shouldReceive ('run ' )->once ()->with (Mockery::on (function (Request $ request ): bool
2828 {
29- Assert::same ('{"variables":{"test":"test"}} ' , $ request ->serialize ());
29+ Assert::same ('{"language":"cs","shop_id":1," variables":{"test":"test","shop_id":1,"lang_id":"cs "}} ' , $ request ->serialize ());
3030 Assert::same ('https://portal.bulkgate.com/api/1.0/eshop/order/new ' , $ request ->url );
3131
3232 return true ;
3333 }));
3434
3535 $ variables = new Variables ();
3636 $ variables ['test ' ] = 'test ' ;
37+ $ variables ['shop_id ' ] = 1 ;
38+ $ variables ['lang_id ' ] = 'cs ' ;
3739
3840 $ hook ->dispatch ('order ' , 'new ' , $ variables ->toArray ());
3941
@@ -47,7 +49,7 @@ class HookTest extends TestCase
4749
4850 $ hook = new Hook ($ version , $ connection = Mockery::mock (Connection::class), new Url (), $ logger = Mockery::mock (Logger::class));
4951 $ connection ->shouldReceive ('run ' )->once ()->andThrow (InvalidResponseException::class, 'error_test ' );
50- $ logger ->shouldReceive ('log ' )->with ('Hook Error: \'api/1.0/eshop/order/new \' - error_test, {"variables":{"test":"test"}} ' )->once ();
52+ $ logger ->shouldReceive ('log ' )->with ('Hook Error: \'api/1.0/eshop/order/new \' - error_test, {"language":null,"shop_id":null," variables":{"test":"test"}} ' )->once ();
5153
5254 $ variables = new Variables ();
5355 $ variables ['test ' ] = 'test ' ;
0 commit comments