File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,12 @@ public function testBuilderSetBuiltInAttributeByNameTypeChecking()
140
140
self ::assertFalse ($ b ->trySet ('anonymous ' , null ));
141
141
self ::assertFalse ($ b ->trySet ('anonymous ' , 3 ));
142
142
self ::assertTrue ($ b ->build ()->isAnonymous ());
143
+
144
+ $ b ->set ('custom-attribute ' , null );
145
+ $ b ->set ('custom-attribute ' , 3 );
146
+ self ::assertTrue ($ b ->trySet ('custom-attribute ' , null ));
147
+ self ::assertTrue ($ b ->trySet ('custom-attribute ' , 3 ));
148
+ self ::assertEquals (['custom-attribute ' ], $ b ->build ()->getCustomAttributeNames ());
143
149
}
144
150
145
151
public function testGetBuiltInAttributeByName ()
@@ -172,6 +178,17 @@ public function testPrivateAttributes()
172
178
);
173
179
}
174
180
181
+ public function testPrivateEmptyAttributes ()
182
+ {
183
+ self ::assertNull (LDContext::create ('a ' )->getPrivateAttributes ());
184
+
185
+ $ c = LDContext::builder ('a ' )->private ()->build ();
186
+ self ::assertEquals (
187
+ null ,
188
+ $ c ->getPrivateAttributes ()
189
+ );
190
+ }
191
+
175
192
public function testCreateMulti ()
176
193
{
177
194
$ c1 = LDContext::create ('a ' , 'kind1 ' );
You can’t perform that action at this time.
0 commit comments