Repository navigation
Namespacing Prado Tests, Unit Tests, and Test Harness Classes in dev with Prado\Test\Unit\ - #1271
Merged
Merged
Conversation
…Namespace `Prado\Test\Unit\`
The PSR-4 test namespace commit recorded four renamed directories with their old lowercase names. macOS resolves them regardless of case, but Linux CI cannot autoload the classes inside them. - tests/unit/Data/ActiveRecord/records -> Records - tests/unit/Data/SqlMap/domain -> Domain - tests/unit/IO/HttpClient/fixtures -> Fixtures - tests/unit/PHPStan/fixtures -> Fixtures
Member
Author
|
Waiting on pradosoft/prado-wsdlgenerator#5. This PR will basically require a few lines of change to all WIP Testing classes. It's a good thing we're doing this too. Finding bugs. Edit: ok... continuing. |
- Blogs record declares TABLE = 'blogs'; without it ActiveRecord uses the fully qualified class name as the table name. - TSoapServerTest serves its provider under a global alias; the WSDL generator writes the provider name into the namespace URI, and a namespaced name carries backslashes, which a URI cannot hold.
belisoful
marked this pull request as ready for review
September 17, 2026 08:57
Member
Author
|
@ctrlaltca Now that the WSDL gen repo is fixed for namespaces providers. this is a go. All new test classes need namespaces and so all WIP is affected. I never like pushing changes like this in the short term, knowing its needed for the long term. |
belisoful
pushed a commit
to belisoful/prado
that referenced
this pull request
Sep 26, 2026
…SubProperties, namespaced tests Updates the REST service files after rebasing onto master so they match the APIs and conventions master adopted since the branch point. Framework: - TRestService::run() logs through Prado\Util\Log\TLogger; the previous Prado\Util\TLogger reference fatals since the logging move (pradosoft#1258). - CORS, Allow, and Vary headers use THttpHeaderName constants, and JSON responses and body detection use TMediaType::JSON (pradosoft#1161). - TRestService::createResource() applies resource properties with setSubProperties() (pradosoft#1283). Tests (pradosoft#1271 conventions): - REST unit tests use the Prado\Test\Unit\Web\Services namespace. - DoStyleResource moves to its own file; the fixtures and inline XML reference it by fully qualified class name. - Private access uses PradoUnit::getProp/setProp/invoke, and globals are reset with PradoUnit::restoreInitialState(). The request's cached PATH_INFO is snapshotted and restored so it no longer leaks between tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This puts the Prado Tests, Unit Tests, Test Harness Classes into namespaces on dev repos.
It makes some folder names PascalCase.
Break out combined class in files into their own files.