Skip to content

Commit

Permalink
feat: Use a comment separator in-between tests in the php tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoomen committed Jun 4, 2019
1 parent 77921e6 commit cfc8b2e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
12 changes: 8 additions & 4 deletions test/languages/php/class-methods.vader
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ Expect php (generated comment with @param tags):

}

# Scenario 2
# ------------------------------------------------------------------------------

Given php (static protected class method with parameters):
class Test {

Expand All @@ -75,7 +76,8 @@ Expect php (generated comment with @param tags):

}

# Scenario 3
# ------------------------------------------------------------------------------

Given php (final public class method with parameters):
class Test {

Expand All @@ -99,7 +101,8 @@ Expect php (generated comment with @param tags):

}

# Scenario 4
# ------------------------------------------------------------------------------

Given php (private static final class method with parameters):
class Test {

Expand All @@ -123,7 +126,8 @@ Expect php (generated comment with @param tags):

}

# Scenario 5
# ------------------------------------------------------------------------------

Given php (constructor method with parameters):
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;

Expand Down
14 changes: 8 additions & 6 deletions test/languages/php/functions-with-namespaces.vader
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# 'Response' is not defined as a an alias.
# ------------------------------------------------------------------------------

# Scenario 1
Given php (function where the type should result in its FQN):
use Symfony\Component\HttpFoundation\Response;

Expand All @@ -26,7 +25,8 @@ Expect php (generated comment containing the FQN):
*/
function myFunction(Response $arg1) {}

# Scenario 2
# ------------------------------------------------------------------------------

Given php (function where the type should result in its FQN with multiple FQN statements after it):
use Symfony\Component\HttpFoundation\Response, use Symfony\Component\Routing\Annotation\Route as BaseRoute;

Expand All @@ -46,7 +46,8 @@ Expect php (generated comment containing the FQN):
*/
function myFunction(Response $arg1) {}

# Scenario 3
# ------------------------------------------------------------------------------

Given php (function where the type should result in its FQN with multiple FQN statements before it):
use Symfony\Component\Routing\Annotation\Route as BaseRoute, Symfony\Component\HttpFoundation\Response;

Expand All @@ -69,7 +70,6 @@ Expect php (generated comment containing the FQN):
# This should return 'BaseRoute' since it is defined as an alias.
# ------------------------------------------------------------------------------

# Scenario 1
Given php (function where the type should not result in its FQN):
use Symfony\Component\Routing\Annotation\Route as BaseRoute;

Expand All @@ -89,7 +89,8 @@ Expect php (generated comment not containing the FQN):
*/
function myFunction(BaseRoute $arg1) {}

# Scenario 2
# ------------------------------------------------------------------------------

Given php (function where the type should not result in its FQN with multiple FQN statements after it):
use Symfony\Component\Routing\Annotation\Route as BaseRoute, Symfony\Component\HttpFoundation\Response;

Expand All @@ -109,7 +110,8 @@ Expect php (generated comment not containing the FQN):
*/
function myFunction(BaseRoute $arg1) {}

# Scenario 3
# ------------------------------------------------------------------------------

Given php (function where the type should not result in its FQN with multiple FQN statements before it):
use Symfony\Component\HttpFoundation\Response, Symfony\Component\Routing\Annotation\Route as BaseRoute;

Expand Down

0 comments on commit cfc8b2e

Please sign in to comment.