Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- behat.yml:
- default:
- suites:
- default:
- contexts:
- - FeatureContext:
- service: '@user.service'
- extensions:
- BehatMinkExtension:
- base_url: http://api.localhost.dev
- goutte: ~
- selenium2: ~
- BehatSymfony2Extension: ~
- config_test.yml:
- ...
- doctrine:
- dbal:
- host: 127.0.0.1
- dbname: my-db-test
- user: root
- password: root
- config_dev.yml:
- ...
- doctrine:
- dbal:
- host: 127.0.0.1
- dbname: my-db-dev
- user: root
- password: root
- Scenario: Create a programmer
- Given I have the payload:
- """
- {
- "name": "John",
- "lastname" : "Doe",
- "username": "john.doe",
- "email": "john.doe@email.com",
- "password": "password",
- "birth": "10/10/1970",
- "type": "normal"
- }
- """
- When I request "POST" "/users"
- Then the response status code should be "201"
- And the "Location" header should be "http://api.localhost.dev/users/john.doe"
- /**
- * @BeforeScenario
- */
- public function clearData()
- {
- $this->_service->deleteUsers();
- }
- | name | lastname| username | email | password |birth | type|
- | John | Doe | john.doe |john.doe@email.com | password | 10/10/1970 | normal |
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement