Skip to content

Commit 364b0ad

Browse files
committed
Add unit test for #227
1 parent e46c80f commit 364b0ad

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

php-mode-test.el

+5
Original file line numberDiff line numberDiff line change
@@ -551,4 +551,9 @@ style from Drupal."
551551
(search-forward "return")
552552
(should (eq (current-indentation) (* 2 c-basic-offset)))))
553553

554+
(ert-deftest php-mode-test-issue-227 ()
555+
"multi-line strings indents "
556+
(custom-set-variables '(php-lineup-cascaded-calls t))
557+
(with-php-mode-test ("issue-227.php" :indent t :style pear)))
558+
554559
;;; php-mode-test.el ends here

tests/issue-227.php

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
/**
4+
* GitHub Issue: https://github.com/ejmr/php-mode/issues/227
5+
*
6+
* Indentation of multi-line strings
7+
*/
8+
9+
function my_func() {
10+
return "a really long string with = inside " .
11+
"some more text"; // ###php-mode-test### ((indent 49))
12+
}

0 commit comments

Comments
 (0)