FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
phpbench/tests/Unit/Remote/ProcessFactoryTest.php at program-executor · phpbench/phpbench · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
phpbench
/
phpbench
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
133
Star
2k
Code
Issues
28
Pull requests
10
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
phpbench
/
tests
/
Unit
/
Remote
/
ProcessFactoryTest.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
27 lines (23 loc) · 784 Bytes
Breadcrumbs
phpbench
/
tests
/
Unit
/
Remote
/
ProcessFactoryTest.php
Copy path
File metadata and controls
27 lines (23 loc) · 784 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
namespace
PhpBench
\
Tests
\
Unit
\
Remote
;
use
PhpBench
\
Remote
\
ProcessFactory
;
use
PHPUnit
\
Framework
\
TestCase
;
use
Psr
\
Log
\
NullLogger
;
class
ProcessFactoryTest
extends
TestCase
{
public
function
testCreatesProcessWithEnv
():
void
{
$
process
= (
new
ProcessFactory
(
new
NullLogger
(), [
'
FOO
'
=>
'
hello
'
,
]))->
create
(
'
echo $FOO
'
);
$
process
->
mustRun
();
self
::
assertStringContainsString
(
'
hello
'
,
$
process
->
getOutput
());
}
public
function
testCreatesProcessInheritsEnv
():
void
{
$
_ENV
[
'
FOO
'
] =
'
bar
'
;
$
process
= (
new
ProcessFactory
(
new
NullLogger
(), [
'
BAZ
'
=>
'
boo
'
]))->
create
(
'
echo $FOO$BAZ
'
);
$
process
->
mustRun
();
self
::
assertStringContainsString
(
'
barboo
'
,
$
process
->
getOutput
());
}
}
Back
|
FazBrowse Home
|
New Git URL