Skip to content

Commit afaead1

Browse files
authored
Merge pull request #2 from denismitr/v2.0
update composer and tests
2 parents db73694 + 7548bcf commit afaead1

8 files changed

+16
-11
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ env:
99
- COMPOSER_FLAGS=""
1010

1111
php:
12-
- 7.0
1312
- 7.2
13+
- 7.3
1414

1515
sudo: false
1616

composer.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=7.0",
14-
"illuminate/database": "~5.5.0|~5.6.0",
15-
"illuminate/support": "~5.5.0|~5.6.0"
13+
"php": ">=7.2",
14+
"illuminate/database": "~5.7.0|~5.8.0",
15+
"illuminate/support": "~5.7.0|~5.8.0"
1616
},
1717
"require-dev": {
18-
"phpunit/phpunit": "^6.5",
19-
"orchestra/testbench": "^3.5",
18+
"phpunit/phpunit": "^7.3",
19+
"orchestra/testbench": "~3.7.0|~3.8.0",
2020
"larapack/dd": "^1.1"
2121
},
2222
"autoload": {
@@ -30,7 +30,7 @@
3030
}
3131
},
3232
"scripts": {
33-
"test": "vendor\\bin\\phpunit",
33+
"test": "./test.sh",
3434
"test-coverage": "vendor\\bin\\phpunit --coverage-html coverage"
3535
},
3636
"config": {

phpunit.xml.dist

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<env name="DB_PASSWORD" value="password"/>
2525
<env name="DB_DATABASE" value="json_attributes"/>
2626
<env name="DB_CONNECTION" value="mysql"/>
27+
<env name="DB_PORT" value="3366"/>
2728
</php>
2829
<logging>
2930
<log type="tap" target="build/report.tap"/>

test.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
docker-compose -f ./tests/docker-compose.yml up -d
2+
php tests/wait.php
3+
./vendor/bin/phpunit
4+
docker-compose -f ./tests/docker-compose.yml down

tests/JsonAttributesTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class JsonAttributesTest extends TestCase
1010
{
1111
private $record;
1212

13-
public function setUp()
13+
public function setUp(): void
1414
{
1515
parent::setUp();
1616

tests/TestCase.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class TestCase extends OrchestraTestCase
1212
{
13-
public function setUp()
13+
public function setUp(): void
1414
{
1515
parent::setUp();
1616

tests/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ services:
1111
MYSQL_ROOT_HOST: "0.0.0.0"
1212
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
1313
ports:
14-
- "3306:3306"
14+
- "3366:3306"

tests/wait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
while (true) {
66
try {
7-
new PDO("mysql:host=127.0.0.1;dbname=json_attributes", 'username', 'password');
7+
new PDO("mysql:host=127.0.0.1:3366;dbname=json_attributes", 'username', 'password');
88
fwrite(STDOUT, 'Docker container started' . PHP_EOL);
99
exit(0);
1010
} catch (PDOException $e) {

0 commit comments

Comments
 (0)