Skip to content

Commit 8756012

Browse files
committed
Use :faces keyword in variable test
1 parent 5f11afa commit 8756012

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

php-mode-test.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,9 +764,9 @@ style from Drupal."
764764
(should (eq 'php-constant
765765
(get-text-property (match-beginning 1) 'face)))))
766766

767-
(ert-deftest php-mode-test-variables()
767+
(ert-deftest php-mode-test-variables ()
768768
"Proper highlighting for variables."
769-
(with-php-mode-test ("variables.php")
769+
(with-php-mode-test ("variables.php" :faces t)
770770
(let ((variables '("regularVariable"
771771
"variableVariable"
772772
"staticVariable")))

tests/variables.php.faces

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
(("<?php" . font-lock-preprocessor-face)
2+
("\n\n" . nil)
3+
("// " . font-lock-comment-delimiter-face)
4+
("Test highlighting of variables with the variable-name-face\n" . font-lock-comment-face)
5+
("$" . php-variable-sigil)
6+
("regularVariable" . php-variable-name)
7+
(";\n" . nil)
8+
("$$" . php-variable-sigil)
9+
("variableVariable" . php-variable-name)
10+
(";\n" . nil)
11+
("MyClass" . php-constant)
12+
("::" . php-paamayim-nekudotayim)
13+
("$" . php-variable-sigil)
14+
("staticVariable" . php-variable-name)
15+
(";\n" . nil)
16+
("$" . php-variable-sigil)
17+
("object" . php-variable-name)
18+
("->" . php-object-op)
19+
("memberVariable" . php-property-name)
20+
(";\n" . nil)
21+
("$" . php-variable-sigil)
22+
("object" . php-variable-name)
23+
("->" . php-object-op)
24+
("funCall" . php-method-call)
25+
("();\n" . nil))

0 commit comments

Comments
 (0)