mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-02 14:25:38 +08:00
cs-fix
This commit is contained in:
@@ -68,8 +68,8 @@ class ZMConfigTest extends TestCase
|
||||
public function testGetValueWhenKeyContainsDot(): void
|
||||
{
|
||||
$this->markTestSkipped('should it be supported?');
|
||||
// $this->assertEquals('c', $this->config->get('test.a.b'));
|
||||
// $this->assertEquals('d', $this->config->get('test.a.b.c'));
|
||||
// $this->assertEquals('c', $this->config->get('test.a.b'));
|
||||
// $this->assertEquals('d', $this->config->get('test.a.b.c'));
|
||||
}
|
||||
|
||||
public function testGetBooleanValue(): void
|
||||
|
||||
@@ -95,7 +95,7 @@ class HttpEventListenerTest extends TestCase
|
||||
return $event->reveal();
|
||||
}
|
||||
|
||||
private function mockHandler(bool $should_be_called, callable $callback = null): self
|
||||
private function mockHandler(bool $should_be_called, ?callable $callback = null): self
|
||||
{
|
||||
$handler = $this->prophesize(self::class);
|
||||
if ($should_be_called) {
|
||||
|
||||
@@ -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 {}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user