File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,8 +9,10 @@ class ProfilingDataTest extends TestCase
99{
1010 public function testExcludeAllEnv ()
1111 {
12+ $ _ENV ['TEST_EXCLUDE_ENV ' ] = 'TEST ' ;
13+
1214 $ config = new Config ([
13- 'profiler.is-exclude-all-env ' => true
15+ 'profiler.is-exclude-all-env ' => true ,
1416 ]);
1517 $ profilingData = new ProfilingData ($ config );
1618
@@ -21,5 +23,20 @@ public function testExcludeAllEnv()
2123 $ this ->assertEmpty ($ result ['meta ' ]['env ' ]);
2224 }
2325
26+ public function testNotExcludeAllEnv ()
27+ {
28+ $ _ENV ['TEST_EXCLUDE_ENV ' ] = 'TEST ' ;
29+
30+ $ config = new Config ([
31+ 'profiler.is-exclude-all-env ' => false ,
32+ ]);
33+ $ profilingData = new ProfilingData ($ config );
34+
35+ $ profile = ['example ' => 'data ' ];
36+ $ result = $ profilingData ->getProfilingData ($ profile );
37+
38+ $ this ->assertEquals ('TEST ' , $ result ['meta ' ]['env ' ]['TEST_EXCLUDE_ENV ' ]);
39+ }
40+
2441
2542}
You can’t perform that action at this time.
0 commit comments