-
Notifications
You must be signed in to change notification settings - Fork 35
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
Move Loaders to this package #3
Comments
This seems to be a very good addition! Before adding it, I have some thoughts though:
I have noticed that many bugs related to my own configuration classes have something to do with the transition from one or more configuration files, to a processed array of configuration values. So I'd be happy to add this functionality. Two ways I think this can be more flexible:
abstract class AbstractContainerExtensionConfigurationTestCase extends AbstractConfigurationTestCase
{
public function assertProcessedConfigurationFromYamlFilesEquals(array $yamlFiles, $expected)
{
// ...
}
} And maybe even fancier: the loader type could of course be resolved by looking at the extension of a configuration file. In conclusion: I'd be happy to make the changes required and I can do it tomorrow (of course mentioning you as a contributor to the solution). |
You can still use them to the test the Configuration classes without the loaders. The 3 default test methods in the CMF testcase should of course be removed.
Sorry, I don't understand this point. Using a constraint seems pretty cool!
That would be great! Otherwise, I can work on it at the end of this week. |
nice, you guyz rock, anyone documenting this? 👶 |
@wouterj I have been working on this today, the thing is: this feature actually belonged in SymfonyDependencInjectionTest. This package (matthiasnoback/symfony-dependency-injection-test) now has a test class specifically designed for testing different types of configuration files. See https://github.com/matthiasnoback/SymfonyDependencyInjectionTest#test-different-configuration-file-formats for implementation details! The SymfonyConfigTest project will have no extra dependencies now, and thus can be used by anybody who uses just the Config component. |
By the way, please let me know if this works for you! |
thanks! I'll try it out next week. |
Thank you too for the excellent suggestion, I think this will turn out as a very useful feature. |
@cordoval I've added a few lines about this to the README file, if you think it needs anything: please let me know (or create a pull request). |
I did some things to be able to use the config loaders when testing the Configuration: symfony-cmf/Testing#27
@dbu proposed to move those changes to here, what do you think about that?
The text was updated successfully, but these errors were encountered: