File tree 2 files changed +25
-1
lines changed
tests/PhpBrew/PrefixFinder
2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public function __construct($name)
28
28
*/
29
29
public function findPrefix ()
30
30
{
31
- $ bin = Utils::findBin (' pg_config ' );
31
+ $ bin = Utils::findBin ($ this -> name );
32
32
33
33
if ($ bin === null ) {
34
34
return null ;
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace PhpBrew \Tests ;
4
+
5
+ use PhpBrew \PrefixFinder \ExecutablePrefixFinder ;
6
+ use PHPUnit \Framework \TestCase ;
7
+
8
+ /**
9
+ * @group prefixfinder
10
+ */
11
+ class ExecutablePrefixFinderTest extends TestCase
12
+ {
13
+ public function testFindValid ()
14
+ {
15
+ $ epf = new ExecutablePrefixFinder ('ls ' );
16
+ $ this ->assertNotNull ($ epf ->findPrefix ());
17
+ }
18
+
19
+ public function testFindInvalid ()
20
+ {
21
+ $ epf = new ExecutablePrefixFinder ('inexistent-binary ' );
22
+ $ this ->assertNull ($ epf ->findPrefix ());
23
+ }
24
+ }
You can’t perform that action at this time.
0 commit comments