From 6ed1eeaf7817d3caff211fab9dc9c6321273101c Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Tue, 10 Dec 2019 02:11:21 +0900 Subject: [PATCH 1/3] Fix missing :magic t flag --- tests/php-mode-test.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/php-mode-test.el b/tests/php-mode-test.el index 1dd84d9b..9eac206c 100644 --- a/tests/php-mode-test.el +++ b/tests/php-mode-test.el @@ -540,7 +540,8 @@ style from Drupal." (ert-deftest php-mode-test-issue-227 () "multi-line strings indents " (custom-set-variables '(php-lineup-cascaded-calls t)) - (with-php-mode-test ("issue-227.php" :indent t :style pear))) + (with-php-mode-test ("issue-227.php" :indent t :style pear :magic t))) + (ert-deftest php-mode-test-issue-237 () "Indent chaining method for PSR2." (with-php-mode-test ("issue-237.php" :indent t :style psr2 :magic t))) From 50e87f85a63d8a9e84e5ae8bc7ed9aedd32041cd Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Tue, 10 Dec 2019 02:27:52 +0900 Subject: [PATCH 2/3] Fix indentation for anonymous class --- php-mode.el | 1 + tests/lang/class/anonymous-class.php | 9 ++++++ tests/lang/class/anonymous-class.php.faces | 32 ++++++++++++++++++++++ tests/php-mode-test.el | 1 + 4 files changed, 43 insertions(+) create mode 100644 tests/lang/class/anonymous-class.php create mode 100644 tests/lang/class/anonymous-class.php.faces diff --git a/php-mode.el b/php-mode.el index f55c62e3..faf2ec5b 100644 --- a/php-mode.el +++ b/php-mode.el @@ -688,6 +688,7 @@ but only if the setting is enabled" (case-label . +) (class-open . 0) (comment-intro . 0) + (inexpr-class . 0) (inlambda . 0) (inline-open . 0) (namespace-open . 0) diff --git a/tests/lang/class/anonymous-class.php b/tests/lang/class/anonymous-class.php new file mode 100644 index 00000000..801e3e7d --- /dev/null +++ b/tests/lang/class/anonymous-class.php @@ -0,0 +1,9 @@ + Date: Tue, 10 Dec 2019 02:28:44 +0900 Subject: [PATCH 3/3] Add indentation and highlighting test for closure --- tests/lang/function/closure.php | 9 +++++++++ tests/lang/function/closure.php.faces | 23 +++++++++++++++++++++++ tests/php-mode-test.el | 1 + 3 files changed, 33 insertions(+) create mode 100644 tests/lang/function/closure.php create mode 100644 tests/lang/function/closure.php.faces diff --git a/tests/lang/function/closure.php b/tests/lang/function/closure.php new file mode 100644 index 00000000..1323fcc6 --- /dev/null +++ b/tests/lang/function/closure.php @@ -0,0 +1,9 @@ +