Skip to content

Commit

Permalink
Fixes for failing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartherbert committed Aug 2, 2011
1 parent 1fd9648 commit 817ffa9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
14 changes: 10 additions & 4 deletions src/tests/unit-tests/php/Phix_Project/Phix/CommandsFinderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ public function testByDefaultSearchesPhpIncludePath()
$phpSearchPath = explode(\PATH_SEPARATOR, \get_include_path());
$finalSearchPath = array();
foreach ($phpSearchPath as $folder)
{
$finalSearchPath[$folder] = $folder;
{
if (\is_dir(\realpath($folder)))
{
$finalSearchPath[$folder] = $folder;
}
}
$this->assertEquals($finalSearchPath, $folders);
}
Expand All @@ -81,8 +84,11 @@ public function testCanAddAdditionalFoldersToSearch()
$phpSearchPath = explode(\PATH_SEPARATOR, \get_include_path());
$finalSearchPath = array();
foreach ($phpSearchPath as $folder)
{
$finalSearchPath[$folder] = $folder;
{
if (\is_dir(\realpath($folder)))
{
$finalSearchPath[$folder] = $folder;
}
}
$finalSearchPath['/usr/bin'] = '/usr/bin';
$this->assertEquals($finalSearchPath, $folders);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public function testShowsHelpOnACommand()
which is defined in the file:
* /home/stuarth/Devel/GWC/phix/src/php/Phix_Project/PhixCommands
* /home/stuart/Devel/Phix/phix/src/php/Phix_Project/PhixCommands
/HelpCommand.php
EOS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public function testOutputsHelpFromSwitches()
which is defined in the file:
* /home/stuarth/Devel/GWC/phix/src/tests/unit-tests/php/Phix_Project
* /home/stuart/Devel/Phix/phix/src/tests/unit-tests/php/Phix_Project
/PhixExtensions/CommandBaseTest.php
EOS;
Expand Down Expand Up @@ -390,7 +390,7 @@ public function testDoesNotOutputOptionsSectionWhenNoSwitches()
which is defined in the file:
* /home/stuarth/Devel/GWC/phix/src/tests/unit-tests/php/Phix_Project
* /home/stuart/Devel/Phix/phix/src/tests/unit-tests/php/Phix_Project
/PhixExtensions/CommandBaseTest.php
EOS;
Expand Down Expand Up @@ -443,7 +443,7 @@ public function testDoesOutputOptionsSectionWhenNoSwitchesOnlyArgs()
which is defined in the file:
* /home/stuarth/Devel/GWC/phix/src/tests/unit-tests/php/Phix_Project
* /home/stuart/Devel/Phix/phix/src/tests/unit-tests/php/Phix_Project
/PhixExtensions/CommandBaseTest.php
EOS;
Expand Down

0 comments on commit 817ffa9

Please sign in to comment.