-
-
Notifications
You must be signed in to change notification settings - Fork 784
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
Namespace and path inconsistencies with Yii2 Testing documentation #155
Comments
Seems to be related to yiisoft/yii2-faker#31. |
Aside from that, why fixtures should be inside the |
I've split this issue into tree different ones with their corresponding PR's:
|
These changes, in addition to providing necessary consistency, brings compatibility with extensions like ElisDN/yii2-gii-fixture-generator: public $fixtureNs = 'tests\fixtures';
public $dataPath = '@tests/fixtures/data'; |
Bumped the same confusion. |
This is not a question. It is an issue pointing out the inconsistencies between this project, the yii2 testing documentation and other yii2 components, which have resulted in costing developers dozens of workhours trying to figure out.
In the Yii2 Testing Documentation the namespace for codeception unit tests is shown as:
namespace app\tests\unit\models;
Meanwhile in yii2-app-basic (which also uses codeception) the namespace for codeception unit tests is:
namespace tests\models;
.Which convention are we supposed to follow? Why are they different?
The whole thing becomes even more confusing when you try to figure out fixtures.
According to Yii2 Testing Documentation, test fixtures are supposed to be located under the following namespace:
app\tests\fixtures
But then the same documentation says:
This seems to match the default path for fixtures generated by yii2-faker which is
@tests/unit/fixtures/data
However, the Yii2 Testing Documentation then gives an example of the data path as:
Why? That is not where yii2-faker puts the generated data by default and the documentation does not explain why it is different.
Could we please do something about it? IMO the template apps and other related components should accurately reflect what is described in the documentation, not implement it in their own unique way.
The text was updated successfully, but these errors were encountered: