Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2b62dc3

Browse filesBrowse files
ahmedash95nicolas-grekas
authored andcommitted
[Process] add tests for php executable finder if file does not exist
1 parent f0a6de2 commit 2b62dc3
Copy full SHA for 2b62dc3

File tree

Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed

‎src/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,16 @@ public function testFindArguments()
6969
$this->assertEquals($f->findArguments(), [], '::findArguments() returns no arguments');
7070
}
7171
}
72+
73+
public function testNotExitsBinaryFile()
74+
{
75+
$f = new PhpExecutableFinder();
76+
$phpBinaryEnv = PHP_BINARY;
77+
putenv('PHP_BINARY=/usr/local/php/bin/php-invalid');
78+
79+
$this->assertFalse($f->find(), '::find() returns false because of not exist file');
80+
$this->assertFalse($f->find(false), '::find(false) returns false because of not exist file');
81+
82+
putenv('PHP_BINARY='.$phpBinaryEnv);
83+
}
7284
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.