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

Application class config #48

Merged
merged 2 commits into from May 24, 2021
Merged

Conversation

DBX12
Copy link
Contributor

@DBX12 DBX12 commented May 11, 2021

As I was testing an application, I realized that it is impossible to change the application class without creating extra config files. By checking the code, I saw that it should be possible to determine the application class by setting a root level class key in the application config file (e.g. common/config/test.php). The issue with that is yii_test is loading this config file as well and get a yii\base\UnknownPropertyException with the message 'Setting unknown property: yii\console\Application::class'.
So either you modify yii_test to unset the class key before creating the console application or create another config file just for codeception and define the class there.
Thus I felt, it would be more sensible to have this configuration value in the codeception module itself.

DBX12 added 2 commits May 11, 2021 07:56
The config option applicationClass allows you to specify which type of
application you want in your test suite.
Not mine but if you see it, you own it.
@SamMousa
Copy link
Collaborator

@samdark could you confirm that the reasoning makes sense? I'm not familiar with the yii app templates or yii_test.

The code itself here LGTM

@Arhell Arhell requested a review from samdark May 11, 2021 15:57
Copy link
Collaborator

@samdark samdark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

@samdark samdark added this to the 1.1.3 milestone May 12, 2021
@samdark samdark merged commit 09853fe into Codeception:master May 24, 2021
@samdark
Copy link
Collaborator

samdark commented May 24, 2021

Thanks.

@DBX12 DBX12 deleted the applicationClassConfig branch May 25, 2021 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants