Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 0c2ac9f

Browse files
committed
Clean up behat scenarios
1 parent 32c89c0 commit 0c2ac9f

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Tests/Features/Context/ResourceContext.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ class ResourceContext implements Context, KernelAwareContext
1717
{
1818
private $session;
1919
private $manager;
20+
/**
21+
* @var KernelInterface
22+
*/
2023
private $kernel;
2124

2225
/**
@@ -61,7 +64,7 @@ public function beforeScenario(BeforeScenarioScope $scope)
6164
/**
6265
* @Given the test application has the following configuration:
6366
*/
64-
public function givenTheApplicationHasTheConfiguration(PyStringNode $config)
67+
public function setApplicationConfig(PyStringNode $config)
6568
{
6669
file_put_contents(self::getConfigurationFile(), $config->getRaw());
6770
}
@@ -79,9 +82,9 @@ public function createFile($filename, PyStringNode $content)
7982
}
8083

8184
/**
82-
* @Given there exists a ":class" document at ":path":
85+
* @Given there exists a :class document at :path:
8386
*/
84-
public function givenThereExistsDocument($class, $path, TableNode $fields)
87+
public function createDocument($class, $path, TableNode $fields)
8588
{
8689
$class = 'Symfony\\Cmf\\Bundle\\ResourceRestBundle\\Tests\\Resources\\TestBundle\\Document\\' . $class;
8790
$path = '/tests' . $path;

Tests/Features/resource_api_phpcr.feature

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ Feature: PHPCR resource repository
2424
Given there exists a "Article" document at "/cmf/articles/foo":
2525
| title | Article 1 |
2626
| body | This is my article |
27-
Then I send a GET request to "/api/phpcr_repo/foo"
28-
And print response
29-
And the response should contain json:
27+
When I send a GET request to "/api/phpcr_repo/foo"
28+
Then the response should contain json:
3029
"""
3130
{
3231
"repository_alias": "phpcr_repo",

Tests/Features/resource_api_phpcr_odm.feature

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Feature: PHPCR-ODM resource repository
1414
1515
cmf_resource_rest:
1616
payload_alias_map:
17-
article:
17+
article:
1818
repository: doctrine_phpcr_odm
1919
type: "Symfony\\Cmf\\Bundle\\ResourceRestBundle\\Tests\\Resources\\TestBundle\\Document\\Article"
2020
"""
@@ -24,9 +24,8 @@ Feature: PHPCR-ODM resource repository
2424
Given there exists a "Article" document at "/cmf/articles/foo":
2525
| title | Article 1 |
2626
| body | This is my article |
27-
Then I send a GET request to "/api/phpcrodm_repo/foo"
28-
And print response
29-
And the response code should be 200
27+
When I send a GET request to "/api/phpcrodm_repo/foo"
28+
Then the response code should be 200
3029
And the response should contain json:
3130
"""
3231
{
@@ -52,9 +51,8 @@ Feature: PHPCR-ODM resource repository
5251
And there exists a "Article" document at "/cmf/articles/foo/boo":
5352
| title | Article child |
5453
| body | But this one is mine |
55-
Then I send a GET request to "/api/phpcrodm_repo/foo"
56-
And print response
57-
And the response code should be 200
54+
When I send a GET request to "/api/phpcrodm_repo/foo"
55+
Then the response code should be 200
5856
And the response should contain json:
5957
"""
6058
{

0 commit comments

Comments
 (0)