File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,12 @@ public function testBuilderSetBuiltInAttributeByNameTypeChecking()
140140 self ::assertFalse ($ b ->trySet ('anonymous ' , null ));
141141 self ::assertFalse ($ b ->trySet ('anonymous ' , 3 ));
142142 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 ());
143149 }
144150
145151 public function testGetBuiltInAttributeByName ()
@@ -172,6 +178,17 @@ public function testPrivateAttributes()
172178 );
173179 }
174180
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+
175192 public function testCreateMulti ()
176193 {
177194 $ c1 = LDContext::create ('a ' , 'kind1 ' );
You can’t perform that action at this time.
0 commit comments