/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
phpunit/class-phpunit-environment-setup-test.php
20 строк
790 B
Shail Mehta
Docs: Use `gutenberg` instead of `Gutenberg` in package name (#71790)
30 сен 2025, 03:47
Не верифицирован
30 сен 2025, 03:47
4932e0c
Код
Авторство
О чём код?
<?php /** * Tests that the environment is configured as expected. * * @package gutenberg */ class Phpunit_Environment_Setup_Test extends WP_UnitTestCase { /** * We trigger the multisite environment by passing the WP_MULTISITE * environment variable. We have run into issues where this is not correctly * added to wp-config by the setup code. We need to know when tests are not * actually running in a multisite environment when they should be. */ public function test_is_multisite_if_defined() { $is_multisite_in_env = ( '1' === getenv( 'WP_MULTISITE' ) ); $this->assertEquals( $is_multisite_in_env, is_multisite(), 'Despite WP_MULTISITE being set in the environment, the tests were not run in multisite mode. There is likely an issue with the phpunit setup.' ); } }