Skip to content

Commit

Permalink
Behat#117 preparation
Browse files Browse the repository at this point in the history
  • Loading branch information
stukalin committed Nov 10, 2016
1 parent 5c14cff commit ffd34be
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
vendor
composer.phar
composer.lock
.idea/*
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
feature:
title: Unsubstituted argument placeholder
language: en
line: 1
description: ~

scenarios:
-
type: outline
title: 'See Annual Leave Details (as Management & Human Resource)'
line: 3
steps:
-
keyword_type: Given
type: Given
text: the <role> exist in the system
line: 4
examples:
7: [ role ]
8: [ HUMAN RESOURCE ]
12: [ MANAGER ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Feature: Unsubstituted argument placeholder

Scenario Outline: See Annual Leave Details (as Management & Human Resource)
Given the <role> exist in the system

Examples:
| role |
| HUMAN RESOURCE |

Examples:
| role |
| MANAGER |
24 changes: 13 additions & 11 deletions tests/Behat/Gherkin/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,26 @@ class ParserTest extends \PHPUnit_Framework_TestCase

public function parserTestDataProvider()
{
$data = array();

foreach (glob(__DIR__ . '/Fixtures/etalons/*.yml') as $file) {
$testname = basename($file, '.yml');

$data[] = array($testname);
}

return $data;
// $data = array();
//
// foreach (glob(__DIR__ . '/Fixtures/etalons/*.yml') as $file) {
// $testname = basename($file, '.yml');
//
// $data[] = array($testname);
// }
//
// return $data;
return [["outline_with_multiple_examples"]];
}

/**
* @dataProvider parserTestDataProvider
*
* @param string $fixtureName name of the fixture
*/
public function testParser($fixtureName)
public function testParser()
{
$fixtureName = 'outline_with_multiple_examples';

$etalon = $this->parseEtalon($fixtureName . '.yml');
$features = $this->parseFixture($fixtureName . '.feature');

Expand Down

0 comments on commit ffd34be

Please sign in to comment.