SqlAstRootClassTest::shouldProvideTokens()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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