1
0
Fork 0

Compare commits

...

2 commits

2 changed files with 23 additions and 3 deletions

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 2024.1230.141448
;; Version: 2025.0122.121804
;; Package-Requires: (php-mode oni-yasnippet oni-flycheck oni-company oni-hydra ggtags fic-mode company-php)
;; This program is free software; you can redistribute it and/or modify
@ -83,8 +83,13 @@ nil for some reason."
(t (car classes)))))
(save-excursion
(goto-char (point-min))
(search-forward "use ")
(forward-paragraph)
(if (search-forward "use " nil t)
(forward-paragraph)
(search-forward "namespace ")
(forward-line)
(insert "\n"))
(let ((start (point)))
(insert "use " class ";\n")
(pulse-momentary-highlight-region start (point))))))

View file

@ -0,0 +1,15 @@
# -*- mode: snippet -*-
# name: test-class
# key: test
# --
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class ${1:`(file-name-sans-extension (file-name-nondirectory (buffer-file-name)))`} extends TestCase
{
use RefreshDatabase, WithFaker;
$0
}