Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"phpstan/phpstan": "^1.0.0",
"phpstan/phpstan-phpunit": "^1.0.0",
"phpstan/phpstan-strict-rules": "^1.0.0",
"phpunit/phpunit": "^10.0",
"phpunit/phpunit": "^10.1",
"psalm/plugin-phpunit": "0.18.4",
"roave/infection-static-analysis-plugin": "^1.6",
"symfony/http-client": "^6.0",
Expand Down
20 changes: 11 additions & 9 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,22 @@
failOnRisky="true"
cacheDirectory=".phpunit.cache"
>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Tests">
<directory>tests</directory>
</testsuite>
</testsuites>

<php>
<env name="CLICKHOUSE_HOST" value="http://127.0.0.1:28123" />
<env name="CLICKHOUSE_USER" value="default" />
<env name="CLICKHOUSE_PASSWORD" value="" />
<env name="CLICKHOUSE_DATABASE" value="default" />
<env name="CLICKHOUSE_HOST" value="http://127.0.0.1:28123"/>
<env name="CLICKHOUSE_USER" value="default"/>
<env name="CLICKHOUSE_PASSWORD" value=""/>
<env name="CLICKHOUSE_DATABASE" value="default"/>
</php>

<source>
<include>
<directory>./src</directory>
</include>
</source>
</phpunit>
2 changes: 1 addition & 1 deletion tests/Client/InsertTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function testInsertEscaping(): void
}

/** @return iterable<int, array<string>> */
public function providerInsert(): iterable
public static function providerInsert(): iterable
{
$sql = <<<'CLICKHOUSE'
CREATE TABLE UserActivity (
Expand Down
6 changes: 3 additions & 3 deletions tests/Client/SelectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function testJson(mixed $expectedData, string $sql): void
}

/** @return iterable<int, array{mixed, string}> */
public function providerJson(): iterable
public static function providerJson(): iterable
{
yield [
[[1 => 1]],
Expand Down Expand Up @@ -78,7 +78,7 @@ public function testJsonCompact(mixed $expectedData, string $sql): void
}

/** @return iterable<int, array{mixed, string}> */
public function providerJsonCompact(): iterable
public static function providerJsonCompact(): iterable
{
yield [
[[1]],
Expand Down Expand Up @@ -117,7 +117,7 @@ public function testJsonEachRow(mixed $expectedData, string $sql): void
}

/** @return iterable<int, array{mixed, string}> */
public function providerJsonEachRow(): iterable
public static function providerJsonEachRow(): iterable
{
yield [
[[1 => 1]],
Expand Down
4 changes: 2 additions & 2 deletions tests/Exception/UnsupportedValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function testType(string $expectedMessage, mixed $value): void
}

/** @return iterable<int, array{string, mixed}> */
public function providerType(): iterable
public static function providerType(): iterable
{
yield [
'Value of type "resource (stream)" is not supported as a parameter',
Expand All @@ -53,7 +53,7 @@ public function testValue(string $expectedMessage, mixed $value): void
}

/** @return iterable<int, array{string, mixed}> */
public function providerValue(): iterable
public static function providerValue(): iterable
{
yield [
'Value "NULL" is not supported as a parameter',
Expand Down
2 changes: 1 addition & 1 deletion tests/Sql/ExpressionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function testTemplateAndValues(string $expectedExpressionString, string $
}

/** @return iterable<int, array{string, string, array<mixed>}> */
public function providerTemplateAndValues(): iterable
public static function providerTemplateAndValues(): iterable
{
yield [
"UUIDStringToNum('6d38d288-5b13-4714-b6e4-faa59ffd49d8')",
Expand Down
2 changes: 1 addition & 1 deletion tests/Sql/SqlFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function testCreateWithParameters(string $expectedSql, string $sqlWithPla
}

/** @return iterable<string, array{string, string, array<string, mixed>}> */
public function providerCreateWithParameters(): iterable
public static function providerCreateWithParameters(): iterable
{
yield 'empty parameters' => [
<<<'CLICKHOUSE'
Expand Down
4 changes: 2 additions & 2 deletions tests/Sql/ValueFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function testFormat(
}

/** @return iterable<string, array<mixed>> */
public function providerFormat(): iterable
public static function providerFormat(): iterable
{
yield 'boolean' => ['1', true];
yield 'integer' => ['1', 1];
Expand Down Expand Up @@ -120,7 +120,7 @@ public function testMapFormat(array $expectedValues, array $values): void
}

/** @return iterable<string, array<array<mixed>>> */
public function providerMapFormat(): iterable
public static function providerMapFormat(): iterable
{
yield 'string' => [["'ping'", "'pong'", 'NULL'], ['ping', 'pong', null]];
}
Expand Down