Skip to content

Commit

Permalink
修复测试
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Oct 26, 2023
1 parent c016846 commit a49b903
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dev/test-coverage-actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ swoolePhpUnitCommands=()

if [[ $testType = "core" ]]; then
# core test
test "core" "php $paramsXdebug -dxdebug.mode=coverage -dapc.enable_cli=1 vendor/bin/phpunit -c ./tests/phpunit.xml --coverage-php=./dev/cover/core-coverage.php -v"
test "core" "php $paramsXdebug -dxdebug.mode=coverage -dapc.enable_cli=1 vendor/bin/phpunit -c ./tests/phpunit.xml --coverage-php=./dev/cover/core-coverage.php"
elif [[ $testType = "swoole" ]]; then
swoolePhpUnitCommands=(
"swoole"
Expand Down
2 changes: 1 addition & 1 deletion dev/test-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ else
fi

# core test
test "core" "php $paramsXdebug -dxdebug.mode=coverage -dapc.enable_cli=1 vendor/bin/phpunit -c ./tests/phpunit.xml --coverage-php=./dev/cover/core-coverage.php -v"
test "core" "php $paramsXdebug -dxdebug.mode=coverage -dapc.enable_cli=1 vendor/bin/phpunit -c ./tests/phpunit.xml --coverage-php=./dev/cover/core-coverage.php"

phpUnitCommands=(
"workerman"
Expand Down
4 changes: 2 additions & 2 deletions src/Components/fpm/tests/HttpServer/Tests/BaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ abstract class BaseTestCase extends \Imi\Fpm\Test\BaseTest
*/
protected $host;

public function __construct(?string $name = null, array $data = [], string $dataName = '')
public function __construct(string $name)
{
parent::__construct($name, $data, $dataName);
parent::__construct($name);
$this->host = env('HTTP_SERVER_HOST', 'http://127.0.0.1:13000/');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ abstract class BaseTest extends \Imi\RoadRunner\Test\BaseTest
*/
protected $host;

public function __construct(?string $name = null, array $data = [], string $dataName = '')
public function __construct(string $name)
{
parent::__construct($name, $data, $dataName);
parent::__construct($name);
$this->host = env('HTTP_SERVER_HOST', 'http://127.0.0.1:13000/');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ abstract class BaseTest extends \Imi\Swoole\Test\BaseTest
*/
protected $host;

public function __construct(?string $name = null, array $data = [], string $dataName = '')
public function __construct(string $name)
{
parent::__construct($name, $data, $dataName);
parent::__construct($name);
$this->host = env('HTTP_SERVER_HOST', 'http://127.0.0.1:13000/');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
*/
class CustomSessionIdTest extends BaseTest
{
public function __construct(?string $name = null, array $data = [], string $dataName = '')
public function __construct(string $name)
{
parent::__construct($name, $data, $dataName);
parent::__construct($name);
$this->host = env('HTTP_SESSION_TEST_SERVER_HOST', 'http://127.0.0.1:13005/');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
class Http2Test extends BaseTest
{
public function __construct(?string $name = null, array $data = [], string $dataName = '')
public function __construct(string $name)
{
parent::__construct($name, $data, $dataName);
parent::__construct($name);
$this->host = env('HTTP_HTTP2_TEST_SERVER_HOST', 'https://127.0.0.1:13007/');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
*/
class HttpsTest extends BaseTest
{
public function __construct(?string $name = null, array $data = [], string $dataName = '')
public function __construct(string $name)
{
parent::__construct($name, $data, $dataName);
parent::__construct($name);
$this->host = env('HTTP_HTTPS_TEST_SERVER_HOST', 'https://127.0.0.1:13006/');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ abstract class BaseTest extends \Imi\Workerman\Test\BaseTest
*/
protected $host;

public function __construct(?string $name = null, array $data = [], string $dataName = '')
public function __construct(string $name)
{
parent::__construct($name, $data, $dataName);
parent::__construct($name);
$this->host = env('HTTP_SERVER_HOST', 'http://127.0.0.1:13000/');
}
}

0 comments on commit a49b903

Please sign in to comment.