Mercurial > hg > isophonics-drupal-site
comparison vendor/theseer/tokenizer/tests/TokenTest.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
1 <?php declare(strict_types = 1); | |
2 namespace TheSeer\Tokenizer; | |
3 | |
4 use PHPUnit\Framework\TestCase; | |
5 | |
6 class TokenTest extends TestCase { | |
7 | |
8 /** @var Token */ | |
9 private $token; | |
10 | |
11 protected function setUp() { | |
12 $this->token = new Token(1,'test-dummy', 'blank'); | |
13 } | |
14 | |
15 public function testTokenCanBeCreated() { | |
16 $this->assertInstanceOf(Token::class, $this->token); | |
17 } | |
18 | |
19 public function testTokenLineCanBeRetrieved() { | |
20 $this->assertEquals(1, $this->token->getLine()); | |
21 } | |
22 | |
23 public function testTokenNameCanBeRetrieved() { | |
24 $this->assertEquals('test-dummy', $this->token->getName()); | |
25 } | |
26 | |
27 public function testTokenValueCanBeRetrieved() { | |
28 $this->assertEquals('blank', $this->token->getValue()); | |
29 } | |
30 | |
31 } |