fix code styles

This commit is contained in:
sunxyw
2022-08-20 18:40:54 +08:00
parent 90282b858e
commit 1a1c65afce
2 changed files with 73 additions and 64 deletions

View File

@@ -1,10 +1,15 @@
<?php
declare(strict_types=1);
namespace Tests\ZM\Config;
use ZM\Config\RefactoredConfig;
use PHPUnit\Framework\TestCase;
use ZM\Config\RefactoredConfig;
/**
* @internal
*/
class RefactoredConfigTest extends TestCase
{
private static $config;
@@ -42,10 +47,14 @@ class RefactoredConfigTest extends TestCase
// 下方测试需要临时写入的文件
file_put_contents($mock_dir . '/test.php', '<?php return ' . var_export($test_config, true) . ';');
file_put_contents($mock_dir . '/test.development.php',
'<?php return ["from" => "environment", "env" => "development"];');
file_put_contents($mock_dir . '/test.production.php',
'<?php return ["from" => "environment", "env" => "production"];');
file_put_contents(
$mock_dir . '/test.development.php',
'<?php return ["from" => "environment", "env" => "development"];'
);
file_put_contents(
$mock_dir . '/test.production.php',
'<?php return ["from" => "environment", "env" => "production"];'
);
file_put_contents($mock_dir . '/test.invalid.php', '<?php return ["from" => "invalid"];');
$config = new RefactoredConfig([