質問編集履歴

1

phpunitのシェルからの実行コマンド、quickrun\.vimの設定を追加

2016/12/28 14:13

投稿

takets
takets

スコア43

test CHANGED
File without changes
test CHANGED
@@ -25,3 +25,69 @@
25
25
 
26
26
 
27
27
  上記のような条件において、CakePHPでユニットテストをする方法、あるいは設定がございましたらご教授ください。
28
+
29
+
30
+
31
+ ###追記・実行したコマンド
32
+
33
+ phpunitのコマンドはcodeceptionで行っているため、以下のコマンドになります
34
+
35
+
36
+
37
+ vendor/bin/codecept run unit AaaTest
38
+
39
+
40
+
41
+ また、vimはquickrun.vimプラグインを使っているため、<leader>rで実行しているためコマンドはございませんが、設定は以下となります。
42
+
43
+
44
+
45
+ let g:quickrun_config = get(g:, 'quickrun_config', {})
46
+
47
+ let g:quickrun_config._ = {
48
+
49
+ \ 'runner' : 'vimproc',
50
+
51
+ \ 'runner/vimproc/updatetime' : 60,
52
+
53
+ \ 'outputter' : 'error',
54
+
55
+ \ 'outputter/error/error' : 'quickfix',
56
+
57
+ \ 'outputter/error/success' : 'buffer',
58
+
59
+ \ 'outputter/buffer/split' : ':rightbelow 8sp',
60
+
61
+ \ 'outputter/buffer/into' : 1,
62
+
63
+ \ 'outputter/buffer/close_on_empty' : 1,
64
+
65
+ \ "ruby/utf8" : {
66
+
67
+ \ "cmdopt" : "-Ku",
68
+
69
+ \ "type" : "ruby"
70
+
71
+ \ },
72
+
73
+ \ }
74
+
75
+
76
+
77
+ augroup QuickRunPHPUnit
78
+
79
+ autocmd!
80
+
81
+ autocmd BufWinEnter,BufNewFile *Test.php set filetype=phpunit.php
82
+
83
+ augroup END
84
+
85
+
86
+
87
+ let g:quickrun_config['phpunit.php'] = {}
88
+
89
+ let g:quickrun_config['phpunit.php']['outputter'] = 'phpunit'
90
+
91
+ let g:quickrun_config['phpunit.php']['command'] = '/varant/testingDir/vendor/bin/phpunit'
92
+
93
+ let g:quickrun_config['phpunit.php']['exec'] = '%c %o %s'