Skip to content

Commit 6ffc127

Browse files
authored
Merge pull request #2 from tyron098/master
fix tests, php 7.3 instead of 7.0 support
2 parents d715628 + 4b67dc2 commit 6ffc127

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
language: php
22
php:
3-
- 7
43
- 7.1
54
- 7.2
5+
- 7.3
66

77
env:
88
- CLICKHOUSE_VERSION=latest
@@ -18,4 +18,4 @@ before_script:
1818
- docker run -d -p 127.0.0.1:8123:8123 --name test-clickhouse-server --ulimit nofile=262144:262144 yandex/clickhouse-server:$CLICKHOUSE_VERSION
1919
- docker logs test-clickhouse-server
2020

21-
script: ./vendor/bin/phpunit
21+
script: ./vendor/bin/phpunit

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"type": "yii2-extension",
66
"license": "MIT",
77
"require": {
8-
"php": ">=7.0",
8+
"php": "^7.1",
99
"yiisoft/yii2": "~2.0.13",
10-
"smi2/phpClickHouse": "^1.2"
10+
"smi2/phpclickhouse": "^1.3.3"
1111
},
1212
"require-dev": {
1313
"phpunit/phpunit": "~5.7"

tests/CommandTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ public function testArrays()
114114
'Array_UInt8' => [5],
115115
'Array_Float64' => [5.5],
116116
'Array_String' => ['asdasd'],
117-
'Array_DateTime' => [date('Y-m-d H:i:s')]
117+
'Array_DateTime' => [date('Y-m-d H:i:s')],
118+
'Array_Nullable_Decimal' => [null, null],
119+
'Array_FixedString_empty' => [],
118120
];
119121

120122
$this->assertEquals(1, $db->createCommand()->insert('{{arrays}}', $dataForInsert)->execute());

tests/data/clickhouse.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,7 @@ CREATE TABLE `types` (
4646
`Array_UInt8` Array(UInt8),
4747
`Array_Float64` Array(Float64),
4848
`Array_String` Array(String),
49-
`Array_DateTime` Array(DateTime)
49+
`Array_DateTime` Array(DateTime),
50+
`Array_Nullable_Decimal` Array(Nullable(Decimal32(4))),
51+
`Array_FixedString_empty` Array(FixedString(2))
5052
) ENGINE=Memory;

0 commit comments

Comments
 (0)