Created
May 22, 2012 14:13
-
-
Save havvg/2769333 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Ormigo\Behat\Context; | |
| class SymfonyPropelAclContext extends BehatContext | |
| { | |
| /** | |
| * @Given /^(?P<user>(user )?)"(?P<securityIdentity>[^"]+)" is (?P<granting>(granted|denied)) access (?P<mask>\d+) for (?P<class>(class )?)"(?P<objectIdentity>[^"]+)"( identified by "(?P<objectIdentifier>[^"]+)")?( on field "(?P<field>[^"]+)")?( with strategy "(?P<strategy>[^"]+)")?$/ | |
| */ | |
| public function updateAce($user, $securityIdentity, $granting, $mask, $class, $objectIdentity, $objectIdentifier = null, $field = null, $strategy = 'any') | |
| { | |
| // ... | |
| } | |
| } |
Author
Stop thinking bout fixtures and testing while you're describing your features. You're talking with role you've stated in narrative of the feature, using your steps. You need to explain him something. Is it required to state that there should be already registered user on the site before describing how it would logging in? Yes? Then state it in the feature. If detail is not important - don't state it.
It's not about fixtures or tests, it's about being able to understand/explore functionality of your project and being able to explain it (with your features) to the benefitiar.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think I got the issue there. I guess the method is fine, but I should not use it directly for the step definition and should add something like
Given I am allowed to create a bookingwhich calls the given one.But now I got a question on the very basic concept: Is it valid to have fixtures in BDD? If so, how are you supposed to have them applied in a nice way. @everzet