SqlAstRootClassTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A shouldProvideTokens() 0 3 1
A setUp() 0 5 1
1
<?php
2
/**
3
 * Copyright (C) 2019  Gerrit Addiks.
4
 * This package (including this file) was released under the terms of the GPL-3.0.
5
 * You should have received a copy of the GNU General Public License along with this program.
6
 * If not, see <http://www.gnu.org/licenses/> or send me a mail so i can send you a copy.
7
 *
8
 * @license GPL-3.0
9
 * @author Gerrit Addiks <[email protected]>
10
 */
11
12
namespace Addiks;
13
14
use Addiks\StoredSQL\Lexing\SqlTokens;
15
use Addiks\StoredSQL\AbstractSyntaxTree\SqlAstRootClass;
16
use PHPUnit\Framework\TestCase;
17
18
final class SqlAstRootClassTest extends TestCase
19
{
20
    private SqlAstRootClass $subject;
21
22
    private SqlTokens $tokens;
23
24
    public function setUp(): void
25
    {
26
        $this->tokens = $this->createMock(SqlTokens::class);
27
28
        $this->subject = new SqlAstRootClass([], $this->tokens);
29
    }
30
31
    /**
32
     * @test
33
     * @covers SqlAstRootClass::tokens
34
     */
35
    public function shouldProvideTokens(): void
36
    {
37
        $this->assertSame($this->tokens, $this->subject->tokens());
38
    }
39
}
40