File tree Expand file tree Collapse file tree 5 files changed +20
-13
lines changed Expand file tree Collapse file tree 5 files changed +20
-13
lines changed Original file line number Diff line number Diff line change 1
1
language : php
2
- sudo : false
2
+ services : mysql
3
3
4
4
php :
5
5
- 7.2
8
8
directories :
9
9
- build/.composer-cache
10
10
11
+ env :
12
+ - PHPUNIT_MYSQL_HOSTNAME="127.0.0.1"
13
+ - PHPUNIT_MYSQL_DATABASE="travis_test"
14
+ - PHPUNIT_MYSQL_USERNAME="travis"
15
+ - PHPUNIT_MYSQL_PASSWORD=""
16
+
11
17
before_install :
18
+ - mysql -e "CREATE DATABASE `travis_test`;"
12
19
- export COMPOSER_CACHE_DIR="$(pwd)/build/.composer-cache"
13
20
- export XDEBUG="/home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini"
14
21
- mv -v "$XDEBUG" "$XDEBUG.disabled"
Original file line number Diff line number Diff line change 11
11
</whitelist >
12
12
</filter >
13
13
<php >
14
- <env name =" phpunit_mysql_hostname " value =" localhost" />
15
- <env name =" phpunit_mysql_database " value =" phpunit_tests" />
16
- <env name =" phpunit_mysql_username " value =" root" />
17
- <env name =" phpunit_mysql_password " value =" toor" />
14
+ <env name =" PHPUNIT_MYSQL_HOSTNAME " value =" localhost" />
15
+ <env name =" PHPUNIT_MYSQL_DATABASE " value =" phpunit_tests" />
16
+ <env name =" PHPUNIT_MYSQL_USERNAME " value =" root" />
17
+ <env name =" PHPUNIT_MYSQL_PASSWORD " value =" toor" />
18
18
</php >
19
19
</phpunit >
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ public function getSpouse(): ?self
92
92
return $ this ->record ->getRelatedModel ('spouse ' );
93
93
}
94
94
95
- public function getHome (): self
95
+ public function getHome (): TestHouseModel
96
96
{
97
97
return $ this ->record ->getRelatedModel ('home ' );
98
98
}
Original file line number Diff line number Diff line change @@ -23,12 +23,12 @@ class TestPersonSchema extends StaticSchema
23
23
protected static $ relationships = [
24
24
'parents ' => [
25
25
'key ' => 'id ' ,
26
- 'schema ' => self ::class,
26
+ 'schema ' => TestParentSchema ::class,
27
27
'field ' => 'child_id ' ,
28
28
],
29
29
'children ' => [
30
30
'key ' => 'id ' ,
31
- 'schema ' => self ::class,
31
+ 'schema ' => TestParentSchema ::class,
32
32
'field ' => 'parent_id ' ,
33
33
],
34
34
'spouse ' => [
@@ -44,7 +44,7 @@ class TestPersonSchema extends StaticSchema
44
44
],
45
45
'home ' => [
46
46
'key ' => 'home_id ' ,
47
- 'schema ' => self ::class,
47
+ 'schema ' => TestHouseSchema ::class,
48
48
'field ' => 'id ' ,
49
49
],
50
50
];
Original file line number Diff line number Diff line change @@ -22,10 +22,10 @@ class MySqlIntegrationTest extends IntegrationTestCase
22
22
protected static function createConnection (): Connection
23
23
{
24
24
return new MySqlConnection (new MySqlConnectionProvider (
25
- $ _ENV ['phpunit_mysql_hostname ' ],
26
- $ _ENV ['phpunit_mysql_database ' ],
27
- $ _ENV ['phpunit_mysql_username ' ],
28
- $ _ENV ['phpunit_mysql_password ' ]
25
+ $ _ENV ['PHPUNIT_MYSQL_HOSTNAME ' ],
26
+ $ _ENV ['PHPUNIT_MYSQL_DATABASE ' ],
27
+ $ _ENV ['PHPUNIT_MYSQL_USERNAME ' ],
28
+ $ _ENV ['PHPUNIT_MYSQL_PASSWORD ' ]
29
29
));
30
30
}
31
31
You can’t perform that action at this time.
0 commit comments