Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined constant "DB_HOST" Latest Pull #208

Open
forgetwp opened this issue Feb 7, 2024 · 3 comments
Open

Undefined constant "DB_HOST" Latest Pull #208

forgetwp opened this issue Feb 7, 2024 · 3 comments
Labels

Comments

@forgetwp
Copy link

forgetwp commented Feb 7, 2024

Just pulled latest version to test issue #154 however, now I am facing with this when testing immediately after doing php test.php following error shows up: (The .env file is set correctly)

Node v21.6.1 (npm v10.2.4)
Success: Prepared environment.
Environment PHP Version: 8.3.2
Environment variables pass checks.
PHPUnit 9.6.16 by Sebastian Bergmann and contributors.

Error in bootstrap script: Error:
Undefined constant "DB_HOST"

0 /phpunit-test-runner/wptest/tests/phpunit/includes/bootstrap.php(30): require_once()
1 /phpunit-test-runner/wptest/vendor/phpunit/phpunit/src/Util/FileLoader.php(66): include_once('...')
2 /phpunit-test-runner/wptest/vendor/phpunit/phpunit/src/Util/FileLoader.php(49): PHPUnit\Util\FileLoader::load()
3 /phpunit-test-runner/wptest/vendor/phpunit/phpunit/src/TextUI/Command.php(565): PHPUnit\Util\FileLoader::checkAndLoad()
4 /phpunit-test-runner/wptest/vendor/phpunit/phpunit/src/TextUI/Command.php(345): PHPUnit\TextUI\Command->handleBootstrap()
5 /phpunit-test-runner/wptest/vendor/phpunit/phpunit/src/TextUI/Command.php(112): PHPUnit\TextUI\Command->handleArguments()
6 /phpunit-test-runner/wptest/vendor/phpunit/phpunit/src/TextUI/Command.php(97): PHPUnit\TextUI\Command->run()
7 /phpunit-test-runner/wptest/vendor/phpunit/phpunit/phpunit(107): PHPUnit\TextUI\Command::main()
8 {main}
Error: Failed to perform operation.

@forgetwp forgetwp added the bug label Feb 7, 2024
@javiercasares
Copy link
Contributor

We fixed it with the latest commit.

@grooverdan
Copy link
Contributor

grooverdan commented Feb 8, 2024

Ack. Appoligies for the commit that broke it. Thanks @javiercasares for fixing . I've still no idea how phpunit-test-runner wrote 'DB_HOST' into a test config file.

@javiercasares
Copy link
Contributor

Don't worry. I left the code because I think we can check what is happening and fix it. We'll do more testing until find a way to get the version ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants