@@ -44,9 +44,11 @@ public function testName()
44
44
public function testUnmappedVariableWithoutForce ()
45
45
{
46
46
putenv ('FOOBAR_TEST_FLAGCEPTION=true ' );
47
+ $ _ENV ['BAZZ_TEST_FLAGCEPTION ' ] = true ;
47
48
48
49
$ activator = new EnvironmentActivator ();
49
50
static ::assertFalse ($ activator ->isActive ('FOOBAR_TEST_FLAGCEPTION ' , new Context ()));
51
+ static ::assertFalse ($ activator ->isActive ('BAZZ_TEST_FLAGCEPTION ' , new Context ()));
50
52
}
51
53
52
54
/**
@@ -57,9 +59,11 @@ public function testUnmappedVariableWithoutForce()
57
59
public function testUnmappedVariableWithForce ()
58
60
{
59
61
putenv ('FOOBAR_TEST_FLAGCEPTION=true ' );
62
+ $ _ENV ['BAZZ_TEST_FLAGCEPTION ' ] = true ;
60
63
61
64
$ activator = new EnvironmentActivator ([], true );
62
65
static ::assertTrue ($ activator ->isActive ('FOOBAR_TEST_FLAGCEPTION ' , new Context ()));
66
+ static ::assertTrue ($ activator ->isActive ('BAZZ_TEST_FLAGCEPTION ' , new Context ()));
63
67
}
64
68
65
69
/**
@@ -70,6 +74,7 @@ public function testUnmappedVariableWithForce()
70
74
public function testUnknownVariableWithForce ()
71
75
{
72
76
putenv ('FOOBAR_TEST_FLAGCEPTION=true ' );
77
+ $ _ENV ['BAZZ_TEST_FLAGCEPTION ' ] = true ;
73
78
74
79
$ activator = new EnvironmentActivator ([], true );
75
80
static ::assertFalse ($ activator ->isActive ('FOOBAR_FEATURE ' , new Context ()));
@@ -83,11 +88,14 @@ public function testUnknownVariableWithForce()
83
88
public function testMappedVariableWithoutForce ()
84
89
{
85
90
putenv ('FOOBAR_TEST_FLAGCEPTION=true ' );
91
+ $ _ENV ['BAZZ_TEST_FLAGCEPTION ' ] = true ;
86
92
87
93
$ activator = new EnvironmentActivator ([
88
- 'feature_test ' => 'FOOBAR_TEST_FLAGCEPTION '
94
+ 'feature_test ' => 'FOOBAR_TEST_FLAGCEPTION ' ,
95
+ 'feature_bazz ' => 'BAZZ_TEST_FLAGCEPTION '
89
96
]);
90
97
static ::assertTrue ($ activator ->isActive ('feature_test ' , new Context ()));
98
+ static ::assertTrue ($ activator ->isActive ('feature_bazz ' , new Context ()));
91
99
}
92
100
93
101
/**
@@ -98,11 +106,14 @@ public function testMappedVariableWithoutForce()
98
106
public function testMappedVariableWithForce ()
99
107
{
100
108
putenv ('FOOBAR_TEST_FLAGCEPTION=true ' );
109
+ $ _ENV ['BAZZ_TEST_FLAGCEPTION ' ] = true ;
101
110
102
111
$ activator = new EnvironmentActivator ([
103
- 'feature_test ' => 'FOOBAR_TEST_FLAGCEPTION '
112
+ 'feature_test ' => 'FOOBAR_TEST_FLAGCEPTION ' ,
113
+ 'feature_bazz ' => 'BAZZ_TEST_FLAGCEPTION '
104
114
], true );
105
115
static ::assertTrue ($ activator ->isActive ('feature_test ' , new Context ()));
116
+ static ::assertTrue ($ activator ->isActive ('feature_bazz ' , new Context ()));
106
117
}
107
118
108
119
/**
@@ -113,9 +124,11 @@ public function testMappedVariableWithForce()
113
124
public function testWrongMappedVariable ()
114
125
{
115
126
putenv ('FOOBAR_TEST_FLAGCEPTION=true ' );
127
+ $ _ENV ['BAZZ_TEST_FLAGCEPTION ' ] = true ;
116
128
117
129
$ activator = new EnvironmentActivator ([
118
- 'feature_test ' => 'FOOBAR_TEST_FLAGCEPTION '
130
+ 'feature_test ' => 'FOOBAR_TEST_FLAGCEPTION ' ,
131
+ 'feature_bazz ' => 'BAZZ_TEST_FLAGCEPTION '
119
132
]);
120
133
static ::assertFalse ($ activator ->isActive ('bazz_foo ' , new Context ()));
121
134
}
@@ -128,10 +141,13 @@ public function testWrongMappedVariable()
128
141
public function testWrongEnvironmentMappedVariable ()
129
142
{
130
143
putenv ('FOOBAR_TEST_FLAGCEPTION=true ' );
144
+ $ _ENV ['BAZZ_TEST_FLAGCEPTION ' ] = true ;
131
145
132
146
$ activator = new EnvironmentActivator ([
133
- 'feature_test ' => 'FOOBAR_FAIL '
147
+ 'feature_test ' => 'FOOBAR_FAIL ' ,
148
+ 'feature_bazz ' => 'BAZZ_FAIL '
134
149
]);
135
150
static ::assertFalse ($ activator ->isActive ('feature_test ' , new Context ()));
151
+ static ::assertFalse ($ activator ->isActive ('feature_bazz ' , new Context ()));
136
152
}
137
153
}
0 commit comments