Skip to content

Commit 7660080

Browse files
committed
Fix error in test
1 parent 8240cfb commit 7660080

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/unit/IssueFixTest.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -917,17 +917,12 @@ public function test35ResolveTodoReCheckOptionsRouteInFractalAction()
917917
// https://github.com/php-openapi/yii2-openapi/issues/35
918918
public function test35ResolveTodoReCheckOptionsRouteInRestAction()
919919
{
920-
$config = require_once Yii::getAlias("@specs/issue_fix/35_resolve_todo_re_check_options_route_in_fractal_action/index.php");
921-
// $content = str_replace("'useJsonApi' => true,", "'useJsonApi' => false,", file_get_contents($testFile));
922-
// file_put_contents($testFile, $content); # TODO this is erroneous
923-
920+
$config = [];
921+
$config = require Yii::getAlias("@specs/issue_fix/35_resolve_todo_re_check_options_route_in_fractal_action/index.php");
924922
$config['useJsonApi'] = false;
925-
926923
$tmpConfigFile = Yii::getAlias("@runtime") . "/tmp-config-35.php";
927924
file_put_contents($tmpConfigFile, '<?php return ' . var_export($config, true) . ';');
928925

929-
930-
931926
$this->runGenerator($tmpConfigFile);
932927
$actualFiles = FileHelper::findFiles(Yii::getAlias('@app'), [
933928
'recursive' => true,

0 commit comments

Comments
 (0)