opened
Zales0123
username_0
| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Fixed tickets | #4225
| License       | MIT
| Doc PR        |

In order to avoid (current or future) duplications and make new behat scenarios even easier to write and it (they're already pretty natural :smile:), here is propose of two additional contexts, containing reusable transformers. Concept is widely described in related issue, just to make it clear about new features:

``SharedStorageContext``:
- ``it`` -> transform to last resource from ``SharedStorage``
- ``this|that|the {resource}`` -> transform to specific resource from ``SharedStorage``

``LexicalContext``:
- ``€103.00`` (string) -> ``10300`` (int)
- ``20%`` (string) -> ``0.2`` (float)

I'm sure we could find lots of more use cases that can be placed in one of this context. Moreover, I hope that by using them wisely, we could get rid of injecting ``SharedContext`` into most of contexts and minimize number of private functions.
[RFC][Behat] Extract reusable transformers
issue
created
pamil
username_1
:+1:, we will have to use shared context directly only to set a resource after this PR gets merged! :)
comment
created
pjedrzejewski
username_2
Thanks Mateusz! :+1:
comment