summaryrefslogtreecommitdiffstats
path: root/application/third_party/test-more-php/t/testertests_interp_env.php
blob: 8c12f0a12ff460e74077520fbadee84a90c2d99f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?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)");

?>