Skip to content

Instantly share code, notes, and snippets.

@junichi11
Created October 11, 2012 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save junichi11/3870579 to your computer and use it in GitHub Desktop.
Save junichi11/3870579 to your computer and use it in GitHub Desktop.
CakePHP PHPUnit for NetBeans
@echo off
set NETBEANSSUITE=
:loop
if "%1"=="" goto end
if "%1"=="NetBeansSuite" goto suite
set NETBEANSSUITE=%NETBEANSSUITE% %1
shift
goto loop
:suite
set NETBEANSSUITE=%NETBEANSSUITE% %1
shift
shift
set NETBEANSSUITE=%NETBEANSSUITE% C:\path\to\NetBeansSuite.php %1=%2
goto loop
:end
php "C:\path\to\phpunit" %NETBEANSSUITE%
#!/bin/bash
NETBEANSSUITE=""
while [ "$1" != "" ]
do
case "$1" in
*NetBeansSuite.php ) NETBEANSSUITE="$NETBEANSSUITE /path/to/NetBeansSuite.php";;
*run ) NETBEANSSUITE="$NETBEANSSUITE $1=$2" shift;;
* ) NETBEANSSUITE="$NETBEANSSUITE $1";;
esac
shift
done
/usr/bin/phpunit $NETBEANSSUITE
@junichi11
Copy link
Author

NetBeansのデフォルトのNetBeansSuite.phpと変更を加えたNetBeansSuite.phpを入れ替かえて実行ためのファイルです。
Windows用です。ファイルパスはおいた場所にあわせて変更してください。
ブートストラップの設定をして、カスタムスクリプトにこのファイルを設定します。
NetBeans7.2用です。7.3では少し仕様が変わるようなので、それにあわせて変更する必要があるかもしれません。

@junichi11
Copy link
Author

とりあえずシェルも書いてみましたが、よく使っている人ならもっと簡単にかけるのかもしれないです。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment