merged branch pvanliefland/form_singularify_prices (PR #5967)

This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5967).

Commits
-------

79f750d [Form] Fixed singularization of "prices"

Discussion
----------

[Form] Fixed singularization of "prices"

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

This PR is similar to #4758, although in this case, the singularization of "prices" into "prex" or "prix" is obviously a mistake. I guess anyone working on a e-commerce platform with multiple prices on a product model could encounter this issue.

I adapted the tests as well ; there shouldn't be any bc break.

---------------------------------------------------------------------------

by bschussek at 2012-11-10T07:23:00Z

👍
This commit is contained in:
Fabien Potencier 2012-11-10 09:15:15 +01:00
commit d2fdd5afbd
2 changed files with 6 additions and 5 deletions

View File

@ -25,8 +25,9 @@ class FormUtilTest extends \PHPUnit_Framework_TestCase
array('funguses', array('fungus', 'funguse', 'fungusis')),
array('fungi', 'fungus'),
array('axes', array('ax', 'axe', 'axis')),
array('appendices', array('appendex', 'appendix')),
array('indices', array('index', 'indix')),
array('appendices', array('appendex', 'appendix', 'appendice')),
array('indices', array('index', 'indix', 'indice')),
array('prices', array('prex', 'prix', 'price')),
array('indexes', 'index'),
array('children', 'child'),
array('men', 'man'),
@ -45,7 +46,7 @@ class FormUtilTest extends \PHPUnit_Framework_TestCase
array('foci', 'focus'),
array('focuses', array('focus', 'focuse', 'focusis')),
array('oases', array('oas', 'oase', 'oasis')),
array('matrices', array('matrex', 'matrix')),
array('matrices', array('matrex', 'matrix', 'matrice')),
array('matrixes', 'matrix'),
array('bureaus', 'bureau'),
array('bureaux', 'bureau'),

View File

@ -65,8 +65,8 @@ abstract class FormUtil
// oxen (ox)
array('nexo', 4, false, false, 'ox'),
// indices (index), appendices (appendix)
array('seci', 4, false, true, array('ex', 'ix')),
// indices (index), appendices (appendix), prices (price)
array('seci', 4, false, true, array('ex', 'ix', 'ice')),
// babies (baby)
array('sei', 3, false, true, 'y'),