|
@@ -527,12 +527,16 @@ final class TokensTest extends TestCase
|
|
|
|
|
|
// test offset and limits of the search
|
|
|
$found = $tokens->findGivenKind([T_CLASS, T_FUNCTION], 10);
|
|
|
+ self::assertArrayHasKey(T_CLASS, $found);
|
|
|
self::assertCount(0, $found[T_CLASS]);
|
|
|
+ self::assertArrayHasKey(T_FUNCTION, $found);
|
|
|
self::assertCount(1, $found[T_FUNCTION]);
|
|
|
self::assertArrayHasKey(26, $found[T_FUNCTION]);
|
|
|
|
|
|
$found = $tokens->findGivenKind([T_CLASS, T_FUNCTION], 2, 10);
|
|
|
+ self::assertArrayHasKey(T_CLASS, $found);
|
|
|
self::assertCount(0, $found[T_CLASS]);
|
|
|
+ self::assertArrayHasKey(T_FUNCTION, $found);
|
|
|
self::assertCount(1, $found[T_FUNCTION]);
|
|
|
self::assertArrayHasKey(9, $found[T_FUNCTION]);
|
|
|
}
|