|
5 | 5 | namespace PhpMyAdmin\Tests; |
6 | 6 |
|
7 | 7 | use PhpMyAdmin\Cache; |
| 8 | +use PhpMyAdmin\Charsets; |
8 | 9 | use PhpMyAdmin\Config; |
9 | 10 | use PhpMyAdmin\ConfigStorage\Relation; |
10 | 11 | use PhpMyAdmin\Container\ContainerBuilder; |
11 | 12 | use PhpMyAdmin\Current; |
12 | 13 | use PhpMyAdmin\Dbal\DatabaseInterface; |
13 | 14 | use PhpMyAdmin\Dbal\DbiExtension; |
| 15 | +use PhpMyAdmin\Encoding; |
14 | 16 | use PhpMyAdmin\I18n\LanguageManager; |
15 | 17 | use PhpMyAdmin\Plugins\Export\ExportSql; |
16 | 18 | use PhpMyAdmin\Sql; |
@@ -68,8 +70,14 @@ protected function setUp(): void |
68 | 70 | Cache::purge(); |
69 | 71 | Tracker::disable(); |
70 | 72 |
|
71 | | - (new ReflectionProperty(Relation::class, 'cache'))->setValue(null, null); |
72 | 73 | ContainerBuilder::$container = null; |
| 74 | + DatabaseInterface::$instance = null; |
| 75 | + Config::$instance = null; |
| 76 | + (new ReflectionProperty(Template::class, 'twig'))->setValue(null, null); |
| 77 | + (new ReflectionProperty(Relation::class, 'cache'))->setValue(null, null); |
| 78 | + (new ReflectionProperty(Charsets::class, 'charsets'))->setValue(null, []); |
| 79 | + (new ReflectionProperty(Charsets::class, 'collations'))->setValue(null, []); |
| 80 | + (new ReflectionProperty(Encoding::class, 'engine'))->setValue(null, null); |
73 | 81 | } |
74 | 82 |
|
75 | 83 | protected function createDatabaseInterface( |
@@ -103,18 +111,6 @@ protected function setProxySettings(): void |
103 | 111 | HttpRequest::setProxySettingsFromEnv(); |
104 | 112 | } |
105 | 113 |
|
106 | | - /** |
107 | | - * Destroys the environment built for the test. |
108 | | - * Clean all variables |
109 | | - */ |
110 | | - protected function tearDown(): void |
111 | | - { |
112 | | - ContainerBuilder::$container = null; |
113 | | - DatabaseInterface::$instance = null; |
114 | | - Config::$instance = null; |
115 | | - (new ReflectionProperty(Template::class, 'twig'))->setValue(null, null); |
116 | | - } |
117 | | - |
118 | 114 | /** |
119 | 115 | * Call protected functions by setting visibility to public. |
120 | 116 | * |
|
0 commit comments