-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Enhance testing documentation with detailed instructions for database-specific testing and local development setup using docker. #82
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
Conversation
…tabase-specific testing and local development setup using docker.
Warning Rate limit exceeded@terabytesoftw has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 30 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughThe documentation for unit testing was expanded to include detailed instructions on database-specific testing. New sections describe how to set up and run tests for MySQL, Oracle, PostgreSQL, SQL Server, and SQLite using Docker containers, along with commands for running PHPUnit tests against each database. The changelog date was updated from July 4 to July 8, 2025. Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant Documentation
Developer->>Documentation: Read unit testing instructions
Documentation->>Developer: Provide setup steps for MySQL, Oracle, PostgreSQL, SQL Server, SQLite
Developer->>Documentation: Follow Docker setup commands
Developer->>Documentation: Run PHPUnit commands for specific database group
Possibly related PRs
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
docs/testing.md (2)
56-60
: Tighten punctuation & spacing in the version listMinor style issues make the bullet list appear untidy:
- Extra space before the period on the PostgreSQL line.
- Superfluous trailing period on the MySQL line (the other bullets omit it).
- Inconsistent dash usage in the SQLite note – prefer an em-dash for clarity.
- - **MySQL** (8.0, 8.4, latest). - - **Oracle** (23). - - **PostgreSQL** (15, 16, 17) . - - **SQL Server** (2022-latest). - - **SQLite** (default, in-memory) - No setup required. + - **MySQL** (8.0, 8.4, latest) + - **Oracle** (23) + - **PostgreSQL** (15, 16, 17) + - **SQL Server** (2022-latest) + - **SQLite** (default, in-memory) — no setup required
64-81
: Clarify group names vs. database namesThe PHPUnit groups use driver names (
oci
,pgsql
,mssql
) whereas the preceding bullet list uses human-friendly DB names. Add a short note to avoid confusion for newcomers:“The PHPUnit group names correspond to the PDO driver IDs (
mysql
,oci
,pgsql
,sqlsrv
,sqlite
).”This prevents users from attempting
--group oracle
or--group sqlserver
.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/testing.md
(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#66
File: migrations/m250707_103609_tree.php:0-0
Timestamp: 2025-07-07T12:38:55.434Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw prefers application-level validation through the NestedSetsBehavior class rather than database-level constraints for nested set integrity. The migrations are meant to be flexible examples since developers may create their own tables.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/ValidationAndStructureTest.php:45-49
Timestamp: 2025-07-08T11:14:34.614Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw prefers explicit connection data (including passwords) in unit test files rather than environment variables, since getEnv() can return false and explicit values ensure more reliable test execution.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/NodePrependTest.php:35-54
Timestamp: 2025-07-08T11:14:24.015Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw prefers hard-coded database credentials in unit test files rather than environment variables, as `getEnv()` returns false in their testing setup and explicit connection data is more reliable for unit tests.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/ValidationAndStructureTest.php:50-53
Timestamp: 2025-07-08T11:14:31.317Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw uses hardcoded database connection credentials in unit tests because environment variables are not reliable in their test environment (getEnv() returns false). They consider hardcoded connection data acceptable for unit tests.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/QueryBehaviorTest.php:36-55
Timestamp: 2025-07-08T11:14:30.383Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw prefers explicit hard-coded test credentials in unit test files rather than environment variables, as getenv() returns false in their test environment. For unit tests, explicitly defining connection data is considered acceptable and more reliable than environment variable configuration.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#13
File: src/NestedSetsBehavior.php:145-145
Timestamp: 2025-06-29T11:22:41.889Z
Learning: The user terabytesoftw prefers to keep PRs focused and small, implementing enhancements in separate dedicated PRs rather than bundling multiple changes together.
docs/testing.md (4)
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/ValidationAndStructureTest.php:50-53
Timestamp: 2025-07-08T11:14:31.317Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw uses hardcoded database connection credentials in unit tests because environment variables are not reliable in their test environment (getEnv() returns false). They consider hardcoded connection data acceptable for unit tests.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/NodePrependTest.php:35-54
Timestamp: 2025-07-08T11:14:24.015Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw prefers hard-coded database credentials in unit test files rather than environment variables, as `getEnv()` returns false in their testing setup and explicit connection data is more reliable for unit tests.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/ValidationAndStructureTest.php:45-49
Timestamp: 2025-07-08T11:14:34.614Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw prefers explicit connection data (including passwords) in unit test files rather than environment variables, since getEnv() can return false and explicit values ensure more reliable test execution.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/QueryBehaviorTest.php:36-55
Timestamp: 2025-07-08T11:14:30.383Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw prefers explicit hard-coded test credentials in unit test files rather than environment variables, as getenv() returns false in their test environment. For unit tests, explicitly defining connection data is considered acceptable and more reliable than environment variable configuration.
🪛 LanguageTool
docs/testing.md
[grammar] ~44-~44: Use proper spacing conventions.
Context: ...l composer run static ``` ## Unit Tests The code is tested with [PHPUnit](https:...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~46-~46: Use proper spacing conventions.
Context: ...nit](https://phpunit.de/). To run tests. shell composer run test
### Database Testing This package supports ...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~52-~52: Use proper spacing conventions.
Context: ...poser run test ``` ### Database Testing This package supports testing with multi...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~54-~54: Use proper spacing conventions.
Context: ...atibility across different environments. - MySQL (8.0, 8.4, latest). - Oracle...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~56-~56: Use proper spacing conventions.
Context: ...nments. - MySQL (8.0, 8.4, latest). - Oracle (23). - PostgreSQL (15, 16,...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~57-~57: Use proper spacing conventions.
Context: ...* (8.0, 8.4, latest). - Oracle (23). - PostgreSQL (15, 16, 17) . - **SQL Serv...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~58-~58: There might be a problem here.
Context: ...le** (23). - PostgreSQL (15, 16, 17) . - SQL Server (2022-latest). - SQLite...
(QB_NEW_EN_MERGED_MATCH)
[grammar] ~59-~59: Use proper spacing conventions.
Context: ...6, 17) . - SQL Server (2022-latest). - SQLite (default, in-memory) - No setup...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[typographical] ~60-~60: To join two clauses or set off examples, consider using an em dash.
Context: ...2022-latest). - SQLite (default, in-memory) - No setup required. #### Database-Specific...
(QB_NEW_EN_DASH_RULE_EM)
[grammar] ~60-~60: Use proper spacing conventions.
Context: ...default, in-memory) - No setup required. #### Database-Specific Testing Run tests aga...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~62-~62: Use proper spacing conventions.
Context: ...equired. #### Database-Specific Testing Run tests against specific database syst...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~64-~64: Use proper spacing conventions.
Context: ...c database systems using PHPUnit groups. shell # MySQL ./vendor/bin/phpunit --group mysql # Oracle ./vendor/bin/phpunit --group oci # PostgreSQL ./vendor/bin/phpunit --group pgsql # SQL Server ./vendor/bin/phpunit --group mssql # SQLite (default - in-memory database) ./vendor/bin/phpunit --group sqlite
#### Local Development Setup For local testi...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~83-~83: Use proper spacing conventions.
Context: ...sqlite ``` #### Local Development Setup For local testing with real databases, y...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~85-~85: Use proper spacing conventions.
Context: ...with real databases, you can use Docker. ##### MySQL ```shell docker run -d --name mysq...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~87-~87: Use proper spacing conventions.
Context: ...abases, you can use Docker. ##### MySQL shell docker run -d --name mysql-test \ -e MYSQL_ROOT_PASSWORD=root \ -e MYSQL_DATABASE=yiitest \ -p 3306:3306 \ mysql:8.4 # Configure your database connection and run. ./vendor/bin/phpunit --group mysql
##### Oracle ```shell docker run -d --name ora...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~99-~99: Use proper spacing conventions.
Context: .../phpunit --group mysql ##### Oracle
shell docker run -d --name oracle-test \ -e ORACLE_PASSWORD=root \ -e ORACLE_DATABASE=yiitest \ -p 1521:1521 \ gvenzl/oracle-free:23 # Configure your database connection and run. ./vendor/bin/phpunit --group oci ##### PostgreSQL
shell docker run -d --name...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~111-~111: Use proper spacing conventions.
Context: ...hpunit --group oci ##### PostgreSQL
shell docker run -d --name pgsql-test \ -e POSTGRES_PASSWORD=root \ -e POSTGRES_DB=yiitest \ -e POSTGRES_USER=root \ -p 5432:5432 \ postgres:17 # Configure your database connection and run. ./vendor/bin/phpunit --group pgsql ##### SQL Server
shell docker run -d --name...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~124-~124: Use proper spacing conventions.
Context: ...unit --group pgsql ##### SQL Server
shell docker run -d --name mssql-test \ -e ACCEPT_EULA=Y \ -e SA_PASSWORD=YourStrong!Passw0rd \ -e MSSQL_PID=Developer \ -p 1433:1433 \ mcr.microsoft.com/mssql/server:2022-latest # Create test database. docker exec -it mssql-test /opt/mssql-tools18/bin/sqlcmd \ -C -S localhost -U SA -P 'YourStrong!Passw0rd' \ -Q "CREATE DATABASE yiitest;" # Configure your database connection and run. ./vendor/bin/phpunit --group mssql ``` ##### SQLite SQLite does not require any setup...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~143-~143: Use proper spacing conventions.
Context: ... by default. You can run tests directly. shell ./vendor/bin/phpunit --group sqlite
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
…umentation for database compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
CHANGELOG.md (1)
3-3
: Consider standard Keep a Changelog formatting for the version headingThe canonical format is
## [0.1.0] - 2025-07-08
, which (a) separates the version and date with “ - ”, (b) uses ISO-8601 for the date, and (c) brackets the version. This minor tweak improves consistency with tooling that parses changelogs.-## 0.1.0 July 8, 2025 +## [0.1.0] - 2025-07-08docs/testing.md (2)
44-50
: Add a colon and tighten wording in the PHPUnit intro sentence
The sentence reads a bit abruptly and is missing the expected colon before the code block.-The code is tested with [PHPUnit](https://phpunit.de/). To run tests. +The code is tested with [PHPUnit](https://phpunit.de/). To run the test suite:
56-61
: Use an em-dash to avoid a “dangling dash” in the SQLite bullet
The current list mixes “–” as a range delimiter and “-” as list continuation.
Replacing the second dash with an em-dash clarifies that the phrase is an aside, not part of the version list.-**SQLite** (default, in-memory) - No setup required +**SQLite** (default, in-memory) — No setup required
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
CHANGELOG.md
(1 hunks)docs/testing.md
(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#66
File: migrations/m250707_103609_tree.php:0-0
Timestamp: 2025-07-07T12:38:55.434Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw prefers application-level validation through the NestedSetsBehavior class rather than database-level constraints for nested set integrity. The migrations are meant to be flexible examples since developers may create their own tables.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/ValidationAndStructureTest.php:45-49
Timestamp: 2025-07-08T11:14:34.614Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw prefers explicit connection data (including passwords) in unit test files rather than environment variables, since getEnv() can return false and explicit values ensure more reliable test execution.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/NodePrependTest.php:35-54
Timestamp: 2025-07-08T11:14:24.015Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw prefers hard-coded database credentials in unit test files rather than environment variables, as `getEnv()` returns false in their testing setup and explicit connection data is more reliable for unit tests.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/ValidationAndStructureTest.php:50-53
Timestamp: 2025-07-08T11:14:31.317Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw uses hardcoded database connection credentials in unit tests because environment variables are not reliable in their test environment (getEnv() returns false). They consider hardcoded connection data acceptable for unit tests.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/QueryBehaviorTest.php:36-55
Timestamp: 2025-07-08T11:14:30.383Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw prefers explicit hard-coded test credentials in unit test files rather than environment variables, as getenv() returns false in their test environment. For unit tests, explicitly defining connection data is considered acceptable and more reliable than environment variable configuration.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#13
File: src/NestedSetsBehavior.php:145-145
Timestamp: 2025-06-29T11:22:41.889Z
Learning: The user terabytesoftw prefers to keep PRs focused and small, implementing enhancements in separate dedicated PRs rather than bundling multiple changes together.
docs/testing.md (4)
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/NodePrependTest.php:35-54
Timestamp: 2025-07-08T11:14:24.015Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw prefers hard-coded database credentials in unit test files rather than environment variables, as `getEnv()` returns false in their testing setup and explicit connection data is more reliable for unit tests.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/ValidationAndStructureTest.php:50-53
Timestamp: 2025-07-08T11:14:31.317Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw uses hardcoded database connection credentials in unit tests because environment variables are not reliable in their test environment (getEnv() returns false). They consider hardcoded connection data acceptable for unit tests.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/ValidationAndStructureTest.php:45-49
Timestamp: 2025-07-08T11:14:34.614Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw prefers explicit connection data (including passwords) in unit test files rather than environment variables, since getEnv() can return false and explicit values ensure more reliable test execution.
Learnt from: terabytesoftw
PR: yii2-extensions/nested-sets-behavior#71
File: tests/mssql/QueryBehaviorTest.php:36-55
Timestamp: 2025-07-08T11:14:30.383Z
Learning: In the yii2-extensions/nested-sets-behavior project, terabytesoftw prefers explicit hard-coded test credentials in unit test files rather than environment variables, as getenv() returns false in their test environment. For unit tests, explicitly defining connection data is considered acceptable and more reliable than environment variable configuration.
🪛 LanguageTool
CHANGELOG.md
[grammar] ~3-~3: Use proper spacing conventions.
Context: # Change Log ## 0.1.0 July 8, 2025 - Initial release
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
docs/testing.md
[grammar] ~44-~44: Use proper spacing conventions.
Context: ...l composer run static ``` ## Unit Tests The code is tested with [PHPUnit](https:...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~46-~46: Use proper spacing conventions.
Context: ...nit](https://phpunit.de/). To run tests. shell composer run test
### Database Testing This package supports ...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~52-~52: Use proper spacing conventions.
Context: ...poser run test ``` ### Database Testing This package supports testing with multi...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~54-~54: Use proper spacing conventions.
Context: ...atibility across different environments. - MySQL (8.0, 8.4, latest) - Oracle ...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[typographical] ~60-~60: To join two clauses or set off examples, consider using an em dash.
Context: ...(2022-latest) - SQLite (default, in-memory) - No setup required #### Database-Specific ...
(QB_NEW_EN_DASH_RULE_EM)
[grammar] ~60-~60: Use proper spacing conventions.
Context: ...(default, in-memory) - No setup required #### Database-Specific Testing Run tests aga...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~62-~62: Use proper spacing conventions.
Context: ...required #### Database-Specific Testing Run tests against specific database syst...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~64-~64: Use proper spacing conventions.
Context: ...c database systems using PHPUnit groups. shell # MySQL ./vendor/bin/phpunit --group mysql # Oracle ./vendor/bin/phpunit --group oci # PostgreSQL ./vendor/bin/phpunit --group pgsql # SQL Server ./vendor/bin/phpunit --group mssql # SQLite (default - in-memory database) ./vendor/bin/phpunit --group sqlite
#### Local Development Setup For local testi...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~83-~83: Use proper spacing conventions.
Context: ...sqlite ``` #### Local Development Setup For local testing with real databases, y...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~85-~85: Use proper spacing conventions.
Context: ...with real databases, you can use Docker. ##### MySQL ```shell docker run -d --name mysq...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~87-~87: Use proper spacing conventions.
Context: ...abases, you can use Docker. ##### MySQL shell docker run -d --name mysql-test \ -e MYSQL_ROOT_PASSWORD=root \ -e MYSQL_DATABASE=yiitest \ -p 3306:3306 \ mysql:8.4 # Configure your database connection and run. ./vendor/bin/phpunit --group mysql
##### Oracle ```shell docker run -d --name ora...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~99-~99: Use proper spacing conventions.
Context: .../phpunit --group mysql ##### Oracle
shell docker run -d --name oracle-test \ -e ORACLE_PASSWORD=root \ -e ORACLE_DATABASE=yiitest \ -p 1521:1521 \ gvenzl/oracle-free:23 # Configure your database connection and run. ./vendor/bin/phpunit --group oci ##### PostgreSQL
shell docker run -d --name...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~111-~111: Use proper spacing conventions.
Context: ...hpunit --group oci ##### PostgreSQL
shell docker run -d --name pgsql-test \ -e POSTGRES_PASSWORD=root \ -e POSTGRES_DB=yiitest \ -e POSTGRES_USER=root \ -p 5432:5432 \ postgres:17 # Configure your database connection and run. ./vendor/bin/phpunit --group pgsql ##### SQL Server
shell docker run -d --name...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~124-~124: Use proper spacing conventions.
Context: ...unit --group pgsql ##### SQL Server
shell docker run -d --name mssql-test \ -e ACCEPT_EULA=Y \ -e 'SA_PASSWORD=YourStrong!Passw0rd' \ -e MSSQL_PID=Developer \ -p 1433:1433 \ mcr.microsoft.com/mssql/server:2022-latest # Create test database. docker exec -it mssql-test /opt/mssql-tools18/bin/sqlcmd \ -C -S localhost -U SA -P 'YourStrong!Passw0rd' \ -Q "CREATE DATABASE yiitest;" # Configure your database connection and run. ./vendor/bin/phpunit --group mssql ``` ##### SQLite SQLite does not require any setup...
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
[grammar] ~143-~143: Use proper spacing conventions.
Context: ... by default. You can run tests directly. shell ./vendor/bin/phpunit --group sqlite
(QB_NEW_EN_OTHER_ERROR_IDS_000007)
🔇 Additional comments (3)
docs/testing.md (3)
64-82
: Verify PHPUnit group names are defined inphpunit.xml
Before merging, double-check that each of the groups (mysql
,oci
,pgsql
,mssql
,sqlite
) is actually tagged on the corresponding test classes. Missing tags will cause the commands in this section to run an empty test-set.
101-108
: ConfirmORACLE_DATABASE
is supported by thegvenzl/oracle-free
image
According to the image docs, the recognised variables areORACLE_PASSWORD
,APP_USER
,APP_USER_PASSWORD
,ORACLE_ALLOW_REMOTE
, etc.ORACLE_DATABASE
might be ignored, leaving you connected to the defaultFREEPDB1
instead ofyiitest
, which breaks test isolation.If the variable is indeed ignored, switch to
- -e ORACLE_DATABASE=yiitest \ + -e APP_USER=yiitest \ + -e APP_USER_PASSWORD=root \or create the database manually via
sqlplus
in anoracle/setup.sh
.
126-136
: Nice fix: SA_PASSWORD is now quoted
Quoting preventsbash
history expansion issues on!
and makes the example copy-paste safe.
Summary by CodeRabbit