ejmr/php-mode — pull request #71 by haxney (2013-02-08 04:51:59+00:00)
Title: Tests with magic comments

This branch simplifies writing tests by enabling the use of "magic tests", which are tests specified by specially-formatted comments.

The file `issue-29.php` is changed to:

```php
$app->get("/index", function() {
$app->redirect("foo"); // ###php-mode-test### ((indent c-basic-offset))
}); // ###php-mode-test### ((indent 0))
```

and its test is simply

```lisp
(ert-deftest php-mode-test-issue-29 ()
(with-php-mode-test ("issue-29.php" :indent t :magic t)))
```

Which will check whether the second line is indented to `c-basic-offset` and the third line is indented to `0`.

Currently, only indentation can be tested.