Compare commits
No commits in common. "5b84406652fea5d79b2ecc4987316d777c1b22c7" and "d37f45294624c44bd2f2c72c53f12da236a5b028" have entirely different histories.
5b84406652
...
d37f452946
@ -2,7 +2,7 @@
|
|||||||
"name": "maiyoule/mqttclient_author",
|
"name": "maiyoule/mqttclient_author",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"description": "MQTT管理模块操作库",
|
"description": "MQTT管理模块操作库",
|
||||||
"version": "1.1.1",
|
"version": "1.1.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace cn\com\maiyoule\mqttclient\biz;
|
|
||||||
|
|
||||||
use cn\com\maiyoule\mqttclient\IRequest;
|
|
||||||
|
|
||||||
class AppUpdateCallbackRequest extends IRequest
|
|
||||||
{
|
|
||||||
|
|
||||||
public function path(): string
|
|
||||||
{
|
|
||||||
return 'app/callback/update';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function body(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'url' => $this->getUrl()
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private string $url;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getUrl(): string
|
|
||||||
{
|
|
||||||
return $this->url;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setUrl(string $url): void
|
|
||||||
{
|
|
||||||
$this->url = $url;
|
|
||||||
}
|
|
||||||
}
|
|
@ -2,13 +2,11 @@
|
|||||||
|
|
||||||
namespace cn\com\maiyoule\mqttclient\test;
|
namespace cn\com\maiyoule\mqttclient\test;
|
||||||
|
|
||||||
use cn\com\maiyoule\mqttclient\biz\AppUpdateCallbackRequest;
|
|
||||||
use cn\com\maiyoule\mqttclient\biz\AppUserCreateRequest;
|
use cn\com\maiyoule\mqttclient\biz\AppUserCreateRequest;
|
||||||
use cn\com\maiyoule\mqttclient\biz\AppUserDeleteRequest;
|
use cn\com\maiyoule\mqttclient\biz\AppUserDeleteRequest;
|
||||||
use cn\com\maiyoule\mqttclient\biz\AppUserUpdateRequest;
|
use cn\com\maiyoule\mqttclient\biz\AppUserUpdateRequest;
|
||||||
use cn\com\maiyoule\mqttclient\exception\ApiException;
|
use cn\com\maiyoule\mqttclient\exception\ApiException;
|
||||||
use cn\com\maiyoule\mqttclient\AuthorServerClient;
|
use cn\com\maiyoule\mqttclient\AuthorServerClient;
|
||||||
use GuzzleHttp\Exception\GuzzleException;
|
|
||||||
use PHPUnit\Framework\Assert;
|
use PHPUnit\Framework\Assert;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
@ -82,16 +80,4 @@ class AppManagerTest extends TestCase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testUpdateAppUrl()
|
|
||||||
{
|
|
||||||
$request = new AppUpdateCallbackRequest();
|
|
||||||
$request->setUrl('http://202.200.18.46:8000/api.php');
|
|
||||||
try {
|
|
||||||
$biz = $this->manager->exec($request);
|
|
||||||
$this->assertTrue($biz->isSuccess(), $biz->getMessage());
|
|
||||||
} catch (GuzzleException|ApiException $e) {
|
|
||||||
$this->fail($e->getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user