<?php $lib = 'Test-More.php'; require_once $lib; $t = new TestMore(); $t->plan(1); if (strpos(strtoupper($_SERVER['OS']), 'WINDOWS') !== FALSE) { // Should also accept extension $newinterp = 'php.exe'; } else { // Fair guess $newinterp = '/usr/local/bin/php'; } $t->is($t->interp($newinterp), $newinterp, "set valid alternate interp by passing arg: interp({$newinterp})");
<?php $lib = 'Test-More.php'; require_once $lib; $t = new TestMore(); $t->plan(1); $t->is($t->interp(), 'php', "interp defaults to php");
public function ok($Result = NULL, $TestName = NULL) { return parent::ok($Result, $this->TestNamePrefix . $TestName); }
<?php $lib = 'Test-More.php'; require_once $lib; $t = new TestMore(); $t->plan(1); if (strpos(strtoupper($_SERVER['OS']), 'WINDOWS') !== FALSE) { // Should also accept extension $newinterp = 'php.exe'; } else { // Fair guess $newinterp = '/usr/local/bin/php'; } $_SERVER['PHP'] = $newinterp; $t->is($t->interp(), $newinterp, "set valid alternate interp via PHP environment variable ({$newinterp})");