branch: externals/phps-mode commit 69ced0da4969bb69bc5c0aebfb9f830a91cc5e37 Author: Christian Johansson <christ...@cvj.se> Commit: Christian Johansson <christ...@cvj.se>
Added another unit test for failed indentation --- phps-test-functions.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/phps-test-functions.el b/phps-test-functions.el index ec7e899..f9974a6 100644 --- a/phps-test-functions.el +++ b/phps-test-functions.el @@ -162,6 +162,13 @@ (should (equal buffer-contents "<?php\nif (myFirstCondition()) {\n $this->var = 'abc123';\n} else if (mySeconCondition()) {\n $this->var = 'def456';\n}\n")))) (phps-mode/with-test-buffer + "<?php\nmyFunction(\n array(\n 'random' => 'abc',\n ),\n $var2\n);\n" + (goto-char 50) + (phps-mode/indent-line) + (let ((buffer-contents (buffer-substring-no-properties (point-min) (point-max)))) + (should (equal buffer-contents "<?php\nmyFunction(\n array(\n 'random' => 'abc',\n ),\n $var2\n);\n")))) + + (phps-mode/with-test-buffer "<?php\n$var = $var2->getHead()\n->getTail();\n" (goto-char 35) (phps-mode/indent-line)