Skip to content

Commit bfda1bd

Browse files
committed
PHPCSDebug/TokenList: add perfunctory test for the register() method
1 parent 8439145 commit bfda1bd

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
/**
3+
* PHPCSDevTools, tools for PHP_CodeSniffer sniff developers.
4+
*
5+
* @package PHPCSDevTools
6+
* @copyright 2019 PHPCSDevTools Contributors
7+
* @license https://opensource.org/licenses/LGPL-3.0 LGPL3
8+
* @link https://github.com/PHPCSStandards/PHPCSDevTools
9+
*/
10+
11+
namespace PHPCSDebug\Tests\Debug;
12+
13+
use PHPUnit\Framework\TestCase;
14+
use PHPCSDebug\Sniffs\Debug\TokenListSniff;
15+
16+
/**
17+
* Unit test class for the TokenList sniff.
18+
*
19+
* @covers \PHPCSDebug\Sniffs\Debug\TokenListSniff::register
20+
*
21+
* @since 1.0.0
22+
*/
23+
final class TokenListRegisterTest extends TestCase
24+
{
25+
26+
/**
27+
* Perfunctory test for the register method.
28+
*
29+
* @return void
30+
*/
31+
public function testRegister()
32+
{
33+
$expected = [
34+
\T_OPEN_TAG,
35+
\T_OPEN_TAG_WITH_ECHO,
36+
];
37+
38+
$sniff = new TokenListSniff();
39+
$this->assertSame($expected, $sniff->register());
40+
}
41+
}

0 commit comments

Comments
 (0)