-
Notifications
You must be signed in to change notification settings - Fork 11
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
Custom attribute values #16
Comments
Great suggestion @svalaskevicius I imagine this to be an Would you imagine this simply to be an array passed as an argument in the $this->manager = new FixtureManager(new YamlProvider());
$this->manager->loadFixture('catalog/product', null, [
'special_price' => '8'
]); Another approach would be use the second argument in the I think repurposing this file as a place to override defaults would achieve the functionality suggested. Thoughts and ideas would be much appreciated :) |
I think the passed array should be fine and cover all the cases I imagined :) |
@svalaskevicius see what you think to that PR :) Do you reckon argument order is a concern? Wouldn't know if the array override or custom yaml files would be used more. Would make it that bit cleaner: $this->productFixture = $this->manager->loadFixture('catalog/product', null, array(
'name' => 'Overridden Product Name',
)); to $this->productFixture = $this->manager->loadFixture('catalog/product', array(
'name' => 'Overridden Product Name',
)); |
It would be good to be able to load the default values from yaml, but still pass some attribute values that override the ones from yml before saving - this allows easier integration with behat steps such as "I have a product with special price "8" pounds" or similar.
The text was updated successfully, but these errors were encountered: