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
CDbTestCase fixtures format #1936
Comments
I will describe this issue with some examples today later, because it can be unclean for understanding now. |
So i suggest at the beginning to do this: add new public property to the |
@Ragazzo I didn't get what you are trying to achive. You describe a solution but I can't see the problem it should solve... Why do you need fixtures in different places? |
I got module and when it has some different components, so lets say one of the component is working with table 1 (t1) and table 2(t2), but i already have fixtures for t2 when i was testing through CDbTestCase model Users, so in this case to test component i need to copy fixture for the t2 to the new folder (fixtures\modules\users\components\someComponentName) and then only test it (the answer to why do i need to store fixtures for the module in different parts is that components or models or other can use fixtures with different data for the same tables). So i want to just load fixtures from the other folder of my module tests, to avoid do it through
where |
Closed for reasons described in #2257 (comment) |
i thought may be it will be good to make
$fixtures
property in this way:In this way it is simple to point to the fixtures path, i know that i can use fixtures manager property
basePath
and set it in setUpBeforeClass(), but i think that this property can be also converted in array() at future for more flexible fixtures managing. So suggestion for now is that key in this array can point to the fixtures path, so the fixture file name is the last one after/
, what do u think? Not hard to implement i think, just some refactoring in fixtures manager on loadFixture method. And if the value of the fixture is model class name then i think need to detect if it is in namespace, so '/path/to/test/model/Test', would be good to pass this one in fixture value, because i have my models in namespaces, or may be i am wrong and there is a way to test fixtures in namespaces in correct way, without this modifying suggestions?The text was updated successfully, but these errors were encountered: