Completed
Pull Request — master (#177)
by Ciaran
11:01
created

ScenarioTest::it_parses_a_scenario_with_title()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Tests\Behat\Gherkin\Parsica;
5
6
use Behat\Gherkin\Node\ScenarioNode;
7
use PHPUnit\Framework\TestCase;
8
use Verraes\Parsica\PHPUnit\ParserAssertions;
9
use function Behat\Gherkin\Parsica\scenario;
10
11
class ScenarioTest extends TestCase
12
{
13
    use ParserAssertions;
14
15
    /** @test */
16
    function it_parses_an_empty_scenario()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
17
    {
18
        $input = 'Scenario:';
19
        $expected = new ScenarioNode('', [], [], 'Scenario', 1);
20
21
        $this->assertParses($input, scenario(), $expected);
0 ignored issues
show
Bug introduced by
The method assertParses() does not exist on Tests\Behat\Gherkin\Parsica\ScenarioTest. Did you maybe mean assertParse()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
22
    }
23
24
    /** @test */
25
    function it_parses_a_scenario_with_title()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
26
    {
27
        $input = 'Scenario: Scenario title';
28
        $expected = new ScenarioNode('Scenario title', [], [], 'Scenario', 1);
29
30
        $this->assertParses($input, scenario(), $expected);
0 ignored issues
show
Bug introduced by
The method assertParses() does not exist on Tests\Behat\Gherkin\Parsica\ScenarioTest. Did you maybe mean assertParse()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
31
    }
32
}
33