Last active
December 29, 2015 10:19
-
-
Save nojimage/7655837 to your computer and use it in GitHub Desktop.
netbeans custom phpunit script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
$paths = array( | |
PHP_BINDIR, | |
'/usr/local/phpenv/shims', | |
getenv('PATH') | |
); | |
putenv('PATH=' . join(PATH_SEPARATOR, $paths)); | |
array_shift($argv); | |
foreach ($argv as $idx => $arg) { | |
if (preg_match('/NetBeansSuite.php$/', $arg) && is_file(__DIR__ . DIRECTORY_SEPARATOR . 'NetBeansSuite.php')) { | |
$arg = __DIR__ . DIRECTORY_SEPARATOR . 'NetBeansSuite.php'; | |
} | |
$argv[$idx] = escapeshellarg($arg); | |
} | |
$args = join(' ', $argv); | |
passthru('XDEBUG_CONFIG="idekey=netbeans-xdebug" phpunit ' . $args); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
phpインタプリタの指定を
.phpenv/shims/php
にすれば、これでいけるぽぃ。/opt/local/binをパスに追加しているのは、macportsのphpがあるため。