summaryrefslogtreecommitdiffstats
path: root/tests/Lexer/IsMethodsTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Lexer/IsMethodsTest.php')
-rw-r--r--tests/Lexer/IsMethodsTest.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/Lexer/IsMethodsTest.php b/tests/Lexer/IsMethodsTest.php
index 9095907..e967514 100644
--- a/tests/Lexer/IsMethodsTest.php
+++ b/tests/Lexer/IsMethodsTest.php
@@ -69,6 +69,7 @@ class IsMethodsTest extends TestCase
$this->assertEquals(Token::FLAG_COMMENT_C, Context::isComment('/*comment */'));
$this->assertEquals(Token::FLAG_COMMENT_SQL, Context::isComment('-- my comment'));
+ $this->assertNull(Context::isComment(''));
$this->assertNull(Context::isComment('--not a comment'));
}
@@ -108,7 +109,8 @@ class IsMethodsTest extends TestCase
$this->assertEquals(Token::FLAG_STRING_SINGLE_QUOTES, Context::isString("'foo bar'"));
$this->assertEquals(Token::FLAG_STRING_DOUBLE_QUOTES, Context::isString('"foo bar"'));
- $this->assertEquals(Context::isString('foo bar'), null);
+ $this->assertNull(Context::isString(''));
+ $this->assertNull(Context::isString('foo bar'));
}
public function testIsSymbol()
@@ -119,7 +121,8 @@ class IsMethodsTest extends TestCase
$this->assertEquals(Token::FLAG_SYMBOL_VARIABLE, Context::isSymbol('@id'));
$this->assertEquals(Token::FLAG_SYMBOL_BACKTICK, Context::isSymbol('`id`'));
- $this->assertEquals(Context::isSymbol('id'), null);
+ $this->assertNull(Context::isSymbol(''));
+ $this->assertNull(Context::isSymbol('id'));
}
public function testisSeparator()