TestShopBuy.php 598 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Dev;
  3. use Tests\TestCase;
  4. use Tests\Unit\ProtoJsonRequestTest;
  5. /**
  6. * 测试施肥
  7. *
  8. */
  9. class TestShopBuy extends ProtoJsonRequestTest
  10. {
  11. public $token = 'f4b3c51a583a601c3e6130710490f64a';
  12. public function test_1()
  13. {
  14. $resp = $this->protobufRequest();
  15. // 必要的验证
  16. dump($resp->serializeToJsonString());
  17. }
  18. /**
  19. * 获取请求的Protobuf数据
  20. * @return string
  21. */
  22. public function requestProtobufJson():string
  23. {
  24. return '{
  25. "shopBuy": {
  26. "good_id":6,
  27. "number":1
  28. }
  29. }';
  30. }
  31. }