Skip to content

Commit dccb6ce

Browse files
committed
Fix few failing tests
1 parent 11bcb4c commit dccb6ce

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ up:
2727
docker-compose run --rm php bash -c 'chmod +rw -R tests/tmp'
2828
docker-compose run --rm php bash -c 'chmod +rw -R tests/codeception'
2929
docker-compose run --rm php bash -c 'mkdir -p tests/testapp/runtime && chmod +rw -R tests/testapp/runtime'
30+
docker-compose run --rm php bash -c 'chmod -R 777 tests/testapp/runtime' # TODO avoid 777
31+
3032

3133
cli:
3234
docker-compose exec php bash

src/JsonApiErrorHandler.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class JsonApiErrorHandler extends ErrorHandler
7070

7171
protected function renderException($exception)
7272
{
73+
Yii::error($exception);
7374
if (Yii::$app->has('response')) {
7475
$response = Yii::$app->getResponse();
7576
// reset parameters of response to avoid interference with partially created response data

tests/codeception/suites/api/ApiUserCest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function testPostsCountAction(ApiTester $I)
122122
$I->amBearerAuthenticated('Gamma_secret_token');
123123
$I->sendHEAD('/me/posts-count');
124124
$I->seeResponseCodeIsSuccessful();
125-
$I->seeHttpHeader('X-Pagination-Total-Count', 18);
125+
$I->seeHttpHeader('X-Pagination-Total-Count', '18');
126126
}
127127

128128
}

tests/docker/xdebug.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ xdebug.discover_client_host=1
55
xdebug.client_port=9000
66
xdebug.idekey=PHPSTORM
77
xdebug.connect_timeout_ms = 10
8+
;https://stackoverflow.com/a/68605372
9+
xdebug.log_level=0

tests/testapp/config/api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
[
6464
'class' => yii\log\FileTarget::class,
6565
'levels' => ['error', 'warning'],
66-
'logFile' => '@runtime/error.log',
66+
'logFile' => '/tmp/yii2-fractal-test-error.log',
6767
'logVars' => ['_GET', '_POST']
6868
],
6969
],

0 commit comments

Comments
 (0)