This commit is contained in:
crazywhalecc
2024-10-02 20:31:16 +08:00
committed by Jerry Ma
parent 2d9f879994
commit ef1a9646e4
72 changed files with 107 additions and 234 deletions

View File

@@ -68,8 +68,7 @@ class ReflectionUtilTest extends TestCase
public function provideTestGetCallReflector(): array
{
$closure = function () {
};
$closure = function () {};
return [
'callable' => [[new ReflectionUtilTestClass(), 'method'], new \ReflectionMethod(ReflectionUtilTestClass::class, 'method')],
@@ -83,18 +82,12 @@ class ReflectionUtilTest extends TestCase
class ReflectionUtilTestClass
{
public function method(string $string, ReflectionUtilTestClass $class): void
{
}
public function method(string $string, ReflectionUtilTestClass $class): void {}
public static function staticMethod(string $string, ReflectionUtilTestClass $class): void
{
}
public static function staticMethod(string $string, ReflectionUtilTestClass $class): void {}
}
class InvokableClass
{
public function __invoke(): void
{
}
public function __invoke(): void {}
}

View File

@@ -16,19 +16,19 @@ class ZMRequestTest extends TestCase
public function testPost()
{
$this->markTestIncomplete('Potential dead on Windows');
// $r = ZMRequest::post('http://httpbin.org/post', [], 'niubi=123');
// $this->assertStringContainsString('123', $r);
// $r2 = ZMRequest::post('http://httpbin.org/post', ['User-Agent' => 'test'], 'oijoij=ooo', [], false);
// $this->assertInstanceOf(ResponseInterface::class, $r2);
// $this->assertStringContainsString('ooo', $r2->getBody()->getContents());
// $r = ZMRequest::post('http://httpbin.org/post', [], 'niubi=123');
// $this->assertStringContainsString('123', $r);
// $r2 = ZMRequest::post('http://httpbin.org/post', ['User-Agent' => 'test'], 'oijoij=ooo', [], false);
// $this->assertInstanceOf(ResponseInterface::class, $r2);
// $this->assertStringContainsString('ooo', $r2->getBody()->getContents());
}
public function testGet()
{
$this->markTestIncomplete('Potential dead on Windows');
// $r = ZMRequest::get('http://httpbin.org/get', [
// 'X-Test' => '123',
// ]);
// $this->assertStringContainsString('123', $r);
// $r = ZMRequest::get('http://httpbin.org/get', [
// 'X-Test' => '123',
// ]);
// $this->assertStringContainsString('123', $r);
}
}