正在显示
4 个修改的文件
包含
7 行增加
和
20 行删除
| @@ -34,7 +34,7 @@ use Lackoxygen\TiktokShop\Support\Verify; | @@ -34,7 +34,7 @@ use Lackoxygen\TiktokShop\Support\Verify; | ||
| 34 | * @method Request\Material\MaterialInterface material() | 34 | * @method Request\Material\MaterialInterface material() |
| 35 | * @method Request\Address\AddressInterface address() | 35 | * @method Request\Address\AddressInterface address() |
| 36 | */ | 36 | */ |
| 37 | -class TiktokShop | 37 | +class Application |
| 38 | { | 38 | { |
| 39 | /** | 39 | /** |
| 40 | * @var Option | 40 | * @var Option |
| @@ -2,9 +2,9 @@ | @@ -2,9 +2,9 @@ | ||
| 2 | 2 | ||
| 3 | namespace Lackoxygen\TiktokShop; | 3 | namespace Lackoxygen\TiktokShop; |
| 4 | 4 | ||
| 5 | -use Illuminate\Support\ServiceProvider; | 5 | +use Illuminate\Support\ServiceProvider as LaravelServiceProvider; |
| 6 | 6 | ||
| 7 | -class TiktokShopProvider extends ServiceProvider | 7 | +class ServiceProvider extends LaravelServiceProvider |
| 8 | { | 8 | { |
| 9 | /** | 9 | /** |
| 10 | * @var string | 10 | * @var string |
| @@ -36,7 +36,7 @@ class TiktokShopProvider extends ServiceProvider | @@ -36,7 +36,7 @@ class TiktokShopProvider extends ServiceProvider | ||
| 36 | public function register() | 36 | public function register() |
| 37 | { | 37 | { |
| 38 | $this->app->singleton(static::$name, function (\Illuminate\Foundation\Application $application, array $args) { | 38 | $this->app->singleton(static::$name, function (\Illuminate\Foundation\Application $application, array $args) { |
| 39 | - return new TiktokShop(...$args); | 39 | + return new Application(...$args); |
| 40 | }); | 40 | }); |
| 41 | } | 41 | } |
| 42 | 42 |
| @@ -70,6 +70,9 @@ class Signature | @@ -70,6 +70,9 @@ class Signature | ||
| 70 | return $this; | 70 | return $this; |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | + /** | ||
| 74 | + * @return false|string | ||
| 75 | + */ | ||
| 73 | public function generate() | 76 | public function generate() |
| 74 | { | 77 | { |
| 75 | $paramPattern = 'app_key' . $this->appKey . 'method' . | 78 | $paramPattern = 'app_key' . $this->appKey . 'method' . |
tests/FetchTest.php
已删除
100644 → 0
| 1 | -<?php | ||
| 2 | - | ||
| 3 | -namespace Lackoxygen\Tests; | ||
| 4 | - | ||
| 5 | -use Lackoxygen\TiktokShop\Facade\TiktokShop; | ||
| 6 | -use Lackoxygen\TiktokShop\Passage\ResultSet; | ||
| 7 | - | ||
| 8 | -class FetchTest extends \PHPUnit\Framework\TestCase | ||
| 9 | -{ | ||
| 10 | - public function testRequest() | ||
| 11 | - { | ||
| 12 | - $obj = TiktokShop::alliance()->materialsProductsSearch([]); | ||
| 13 | - | ||
| 14 | - $this->assertInstanceOf($obj, ResultSet::class); | ||
| 15 | - } | ||
| 16 | -} |
-
请 注册 或 登录 后发表评论