Completed
Pull Request — master (#112)
by Christophe
02:27
created

PyStringNodeTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 21
wmc 2
lcom 0
cbo 2
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetStrings() 0 6 1
A testGetRaw() 0 11 1
1
<?php
2
3
namespace Tests\Behat\Gherkin\Node;
4
5
use Behat\Gherkin\Node\PyStringNode;
6
7
class PyStringNodeTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function testGetStrings()
10
    {
11
        $str = new PyStringNode(array('line1', 'line2', 'line3'), 0);
12
13
        $this->assertEquals(array('line1', 'line2', 'line3'), $str->getStrings());
14
    }
15
16
    public function testGetRaw()
17
    {
18
        $str = new PyStringNode(array('line1', 'line2', 'line3'), 0);
19
20
        $expected = <<<STR
21
line1
22
line2
23
line3
24
STR;
25
        $this->assertEquals($expected, $str->getRaw());
26
    }
27
}
28