@@ -108,17 +108,7 @@ have a string face."
108
108
(ert-deftest php-mode-test-issue-14 ()
109
109
" Array indentation."
110
110
:expected-result :failed
111
- (with-php-mode-test (" issue-14.php" )
112
- (let ((expected (concat " $post = Post::model()->find(array(\n "
113
- " 'select' => 'title',\n "
114
- " 'condition' => 'postID=:postID',\n "
115
- " 'params' => array(':postID'=>10),\n "
116
- " ));" )))
117
- (indent-region (point-min ) (point-max ))
118
- (goto-char (point-min ))
119
- (re-search-forward " ^\\ $post" )
120
- (should (string= (buffer-substring-no-properties (match-beginning 0 ) (point-max ))
121
- expected)))))
111
+ (with-php-mode-test (" issue-14.php" :indent t :magic t )))
122
112
123
113
(ert-deftest php-mode-test-issue-16 ()
124
114
" Comma separated \" use\" (namespaces).
@@ -136,9 +126,7 @@ Gets the face of the text after the comma."
136
126
(ert-deftest php-mode-test-issue-19 ()
137
127
" Alignment of arrow operators."
138
128
:expected-result :failed
139
- (with-php-mode-test (" issue-19.php" )
140
- (indent-region (point-min ) (point-max ))
141
- (goto-char (point-min ))
129
+ (with-php-mode-test (" issue-19.php" :indent t )
142
130
(while (re-search-forward " ^\\ s-*\\ $object->" )
143
131
; ; Point is just after `->'
144
132
(let ((col (current-column )))
@@ -166,11 +154,7 @@ This applies for both single and double quotes."
166
154
167
155
(ert-deftest php-mode-test-issue-27 ()
168
156
" Indentation in a file with a shebang."
169
- (with-php-mode-test (" issue-27.php" )
170
- (re-search-forward " ^\\ s-*// Tab" )
171
- (indent-for-tab-command )
172
- (back-to-indentation )
173
- (should (eq (current-column ) tab-width))))
157
+ (with-php-mode-test (" issue-27.php" :indent t :magic t )))
174
158
175
159
(ert-deftest php-mode-test-issue-28 ()
176
160
" Slowdown when scrolling.
@@ -186,16 +170,10 @@ This doesn't test anything, for now."
186
170
(ert-deftest php-mode-test-issue-29 ()
187
171
" Indentation of anonymous functions as arguments.
188
172
The closing brace and parenthesis should be at column 0."
189
- (with-php-mode-test (" issue-29.php" )
190
- (indent-region (point-min ) (point-max ))
191
- (goto-char (point-min ))
192
- (re-search-forward " ^\\ s-*});" )
193
- (back-to-indentation )
194
- (should (eq (current-column ) 0 ))))
173
+ (with-php-mode-test (" issue-29.php" :indent t :magic t )))
195
174
196
175
(ert-deftest php-mode-test-issue-42 ()
197
176
" Error while indenting closures.
198
177
If the bug has been fixed, indenting the buffer should not cause
199
178
an error."
200
- (with-php-mode-test (" issue-42.php" )
201
- (indent-region (point-min ) (point-max ))))
179
+ (with-php-mode-test (" issue-42.php" :indent t )))
0 commit comments