I assume you mean you're running php unit through ST build system? If that's so here's how I managed to fix a similar problem
Solution 1: Symlink
mv /usr/bin/php /usr/bin/php53
ln -s /usr/local/php5/bin/php /usr/bin/php
Solution 2: Edit or create a second build system for PHP
{ “cmd”: [“/usr/local/php5/bin/php”, “$file”], “file_regex”: “php$”, “selector”: “source.php” }
The problem you're facing is most likely caused by that the user under which ST runs PHP is not set up to use /usr/local/php5/bin/php
executable, but the OS X built in old PHP 5.3 as /usr/bin/
is the next place where system tries to find the executable, if it's not found in a local bin directory.
I suggest using solution 1 as that way you will be sure everything on your system is using the correct PHP version.