style: lint

Signed-off-by: 李东云 <dongyu.li@luxcreo.ai>
This commit is contained in:
李东云
2023-12-18 15:58:52 +08:00
parent f2f7e67d0e
commit 9d2e4ca9f8
2 changed files with 12 additions and 5 deletions

View File

@@ -23,3 +23,4 @@ parameters:
- '#Call to an undefined method Hyperf\\Contract\\SessionInterface::isValidId\(\).#'
- '#Call to an undefined method LightSaml\\Model\\Protocol\\SamlMessage::setInResponseTo\(\).#'
- '#Class App\\Constants\\ErrorCode not found.#'
- '#Undefined variable: \$this#'

View File

@@ -12,12 +12,12 @@ declare(strict_types=1);
namespace Tests;
use function Hyperf\Config\config;
use Hyperf\Testing\Client;
use Lmc\HttpConstants\Header;
use PHPUnit\Framework\TestCase;
use Singularity\HDK\Core\Enumerations\Http\Header\RFCs\RFC7617;
use function Hyperf\Config\config;
use function Hyperf\Support\make;
/**
@@ -35,13 +35,19 @@ abstract class HttpTestCase extends TestCase
{
protected Client $client;
public function __construct($name = null, array $data = [], $dataName = '')
public function __construct(?string $name = null)
{
parent::__construct($name, $data, $dataName);
parent::__construct($name);
$this->client = make(Client::class);
}
public function __call($name, $arguments)
/**
* @param string $name
* @param array<int, mixed> $arguments
*
* @return array<string, mixed>
*/
public function __call(string $name, array $arguments): array
{
$uri = $arguments[0];
$data = $arguments[1] ?? [];