Completed
Push — master ( b6cc57...033934 )
by Harry
8s
created

StateTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCallGetNextStateWithAnInvalidTokenWillThrowAnException() 0 10 1
1
<?php
2
3
namespace Graze\CsvToken\Test\Unit\Tokeniser;
4
5
use Graze\CsvToken\Test\TestCase;
6
use Graze\CsvToken\Tokeniser\State;
7
use Graze\CsvToken\Tokeniser\Token;
8
use RuntimeException;
9
10
class StateTest extends TestCase
11
{
12
    public function testCallGetNextStateWithAnInvalidTokenWillThrowAnException()
13
    {
14
        $state = new State([]);
15
        $state->addStateTarget(Token::T_CONTENT, $state);
16
17
        static::assertSame($state, $state->getNextState(Token::T_CONTENT));
18
19
        static::expectException(RuntimeException::class);
20
        $state->getNextState(Token::T_ESCAPE);
21
    }
22
}
23