emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/php-mode 23d8249e72 02/11: Fix type-hints.php test for Ema


From: ELPA Syncer
Subject: [nongnu] elpa/php-mode 23d8249e72 02/11: Fix type-hints.php test for Emacs 29.1-rc1
Date: Sun, 23 Jul 2023 16:01:08 -0400 (EDT)

branch: elpa/php-mode
commit 23d8249e7298d0b34c7ffbeedb14d59b8b456b66
Author: USAMI Kenta <tadsan@zonu.me>
Commit: USAMI Kenta <tadsan@zonu.me>

    Fix type-hints.php test for Emacs 29.1-rc1
---
 tests/php-mode-test.el        |   3 +-
 tests/type-hints.php.29.faces | 590 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 592 insertions(+), 1 deletion(-)

diff --git a/tests/php-mode-test.el b/tests/php-mode-test.el
index 0dae822e95..b827fcfcde 100644
--- a/tests/php-mode-test.el
+++ b/tests/php-mode-test.el
@@ -596,7 +596,8 @@ style from Drupal."
 
 (ert-deftest php-mode-test-type-hints ()
   "Test highlighting of type hints and return types."
-  (with-php-mode-test ("type-hints.php" :faces t)))
+  (with-php-mode-test ("type-hints.php" :faces (cond ((version<= "29" 
emacs-version) ".29.faces")
+                                                     (t)))))
 
 (ert-deftest php-mode-test-static-method-calls ()
   "Test highlighting of static method calls which are named the same
diff --git a/tests/type-hints.php.29.faces b/tests/type-hints.php.29.faces
new file mode 100644
index 0000000000..14cf581e53
--- /dev/null
+++ b/tests/type-hints.php.29.faces
@@ -0,0 +1,590 @@
+;; -*- mode: emacs-lisp -*-
+(("<?php" . php-php-tag)
+ ("
+
+")
+ ("class" . php-class-declaration)
+ (" ")
+ ("SomeClass" . font-lock-type-face)
+ ("
+{
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("none" . php-function-name)
+ ("(")
+ ("$" . php-variable-sigil)
+ ("title" . php-variable-name)
+ ("): ")
+ ("void" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("title" . php-function-name)
+ ("(")
+ ("string" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("title" . php-variable-name)
+ ("): ")
+ ("string" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("nullableTitle" . php-function-name)
+ ("(")
+ ("?string" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("title" . php-variable-name)
+ ("): ")
+ ("?string" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("number" . php-function-name)
+ ("(")
+ ("int" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("number" . php-variable-name)
+ ("): ")
+ ("int" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("nullableNumber" . php-function-name)
+ ("(")
+ ("?int" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("number" . php-variable-name)
+ ("): ")
+ ("?int" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("otherNumber" . php-function-name)
+ ("(")
+ ("float" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("number" . php-variable-name)
+ ("): ")
+ ("float" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("nullableOtherNumber" . php-function-name)
+ ("(")
+ ("?float" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("number" . php-variable-name)
+ ("): ")
+ ("?float" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("flag" . php-function-name)
+ ("(")
+ ("bool" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("flag" . php-variable-name)
+ ("): ")
+ ("bool" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("nullableFlag" . php-function-name)
+ ("(")
+ ("?bool" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("flag" . php-variable-name)
+ ("): ")
+ ("?bool" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("options" . php-function-name)
+ ("(")
+ ("array" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("options" . php-variable-name)
+ ("): ")
+ ("array" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("nullableOptions" . php-function-name)
+ ("(")
+ ("?array" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("options" . php-variable-name)
+ ("): ")
+ ("?array" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("object" . php-function-name)
+ ("(stdClass ")
+ ("$" . php-variable-sigil)
+ ("object" . php-variable-name)
+ ("): ")
+ ("stdClass" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("nullableObject" . php-function-name)
+ ("(")
+ ("?stdClass" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("object" . php-variable-name)
+ ("): ")
+ ("?stdClass" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("nsObject" . php-function-name)
+ ("(")
+ ("\\path\\to\\my\\Object" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("object" . php-variable-name)
+ ("): ")
+ ("\\path\\to\\my\\Object" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("nullableNsObject" . php-function-name)
+ ("(")
+ ("?\\path\\to\\my\\Object" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("object" . php-variable-name)
+ ("): ")
+ ("?\\path\\to\\my\\Object" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("callable" . php-function-name)
+ ("(")
+ ("callable" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("callable" . php-variable-name)
+ ("): ")
+ ("callable" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("nullableCallable" . php-function-name)
+ ("(")
+ ("?callable" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("callable" . php-variable-name)
+ ("): ")
+ ("?callable" . font-lock-type-face)
+ ("
+    {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("someFunction" . php-function-name)
+ ("(
+        ")
+ ("$" . php-variable-sigil)
+ ("any" . php-variable-name)
+ (",
+        ")
+ ("string" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("name" . php-variable-name)
+ (",
+        ")
+ ("int" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("value" . php-variable-name)
+ (",
+        ")
+ ("bool" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("flag" . php-variable-name)
+ (",
+        ")
+ ("array" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("options" . php-variable-name)
+ (",
+        ")
+ ("stdClass" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("object" . php-variable-name)
+ (",
+        ")
+ ("\\path\\to\\my\\Object" . font-lock-type-face)
+ (" ")
+ ("$" . php-variable-sigil)
+ ("nsObject" . php-variable-name)
+ ("
+    ): ")
+ ("void" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getNone" . php-function-name)
+ ("(
+    ): ")
+ ("void" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getTitle" . php-function-name)
+ ("(
+    ): ")
+ ("string" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getNullableTitle" . php-function-name)
+ ("(
+    ): ")
+ ("?string" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getNumber" . php-function-name)
+ ("(
+    ): ")
+ ("int" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getNullableNumber" . php-function-name)
+ ("(
+    ): ")
+ ("?int" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getOtherNumber" . php-function-name)
+ ("(
+    ): ")
+ ("float" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getNullableOtherNumber" . php-function-name)
+ ("(
+    ): ")
+ ("?float" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getFlag" . php-function-name)
+ ("(
+    ): ")
+ ("bool" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getNullableFlag" . php-function-name)
+ ("(
+    ): ")
+ ("?bool" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getOptions" . php-function-name)
+ ("(
+    ): ")
+ ("array" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getNullableOptions" . php-function-name)
+ ("(
+    ): ")
+ ("?array" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getObject" . php-function-name)
+ ("(
+    ): ")
+ ("stdClass" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getNullableObject" . php-function-name)
+ ("(
+    ): ")
+ ("?stdClass" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("abstract" . php-keyword)
+ (" ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getOtherObject" . php-function-name)
+ ("(
+    ): ")
+ ("stdClass" . font-lock-type-face)
+ (";
+
+    ")
+ ("abstract" . php-keyword)
+ (" ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getOtherNullableObject" . php-function-name)
+ ("(
+    ): ")
+ ("?stdClass" . font-lock-type-face)
+ (";
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getNsObject" . php-function-name)
+ ("(
+    ): ")
+ ("\\path\\to\\my\\Object" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getNullableNsObject" . php-function-name)
+ ("(
+    ): ")
+ ("?\\path\\to\\my\\Object" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getCallable" . php-function-name)
+ ("(
+    ): ")
+ ("callable" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("getNullableCallable" . php-function-name)
+ ("(
+    ): ")
+ ("?callable" . font-lock-type-face)
+ (" {
+    }
+
+    ")
+ ("public" . php-keyword)
+ (" ")
+ ("function" . php-keyword)
+ (" ")
+ ("neverReturn" . php-function-name)
+ ("(
+    ): ")
+ ("never" . font-lock-type-face)
+ (" {
+    }
+}
+"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]