Skip to content

Commit ae210e7

Browse files
committed
Add regression test #305
1 parent 9083f3a commit ae210e7

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

php-mode-test.el

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,15 @@ style from Drupal."
596596
(should (eq (get-text-property (1- (match-end 0)) 'face)
597597
'php-annotations-annotation-face))))
598598

599+
(ert-deftest php-mode-test-issue-305 ()
600+
"Test highlighting variables which contains 'this' or 'that'."
601+
(with-php-mode-test ("issue-305.php")
602+
(search-forward "Start:")
603+
(search-forward "$this")
604+
(should-not (eq 'font-lock-constant-face (get-text-property (- (point) 1) 'face)))
605+
(search-forward "$that")
606+
(should-not (eq 'font-lock-constant-face (get-text-property (- (point) 1) 'face)))))
607+
599608
;;; php-mode-test.el ends here
600609

601610
;; Local Variables:

tests/issue-305.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
/**
4+
* GitHub Issue: https://github.com/ejmr/php-mode/issues/305
5+
*
6+
* Test highighting of $this_foo, $that_foo
7+
*/
8+
9+
// Start:
10+
$this_foo;
11+
$that_foo;

0 commit comments

Comments
 (0)