@@ -72,7 +72,10 @@ public function testGetValue(): void
7272
7373 // Normal use
7474 $ this ->assertTrue ($ c ->getValue ('exists_true ' ));
75- $ this ->assertNull ($ c ->getValue ('exists_null ' ));
75+
76+ // Null option
77+ $ this ->expectException (AssertionFailedException::class);
78+ $ c ->getValue ('exists_null ' );
7679
7780 // Missing option
7881 $ this ->expectException (AssertionFailedException::class);
@@ -108,7 +111,7 @@ public function testHasValue(): void
108111 ]);
109112 $ this ->assertEquals ($ c ->hasValue ('missing ' ), false );
110113 $ this ->assertEquals ($ c ->hasValue ('exists_true ' ), true );
111- $ this ->assertEquals ($ c ->hasValue ('exists_null ' ), true );
114+ $ this ->assertEquals ($ c ->hasValue ('exists_null ' ), false );
112115 }
113116
114117
@@ -124,7 +127,7 @@ public function testHasValueOneOf(): void
124127 $ this ->assertEquals ($ c ->hasValueOneOf ([]), false );
125128 $ this ->assertEquals ($ c ->hasValueOneOf (['missing ' ]), false );
126129 $ this ->assertEquals ($ c ->hasValueOneOf (['exists_true ' ]), true );
127- $ this ->assertEquals ($ c ->hasValueOneOf (['exists_null ' ]), true );
130+ $ this ->assertEquals ($ c ->hasValueOneOf (['exists_null ' ]), false );
128131
129132 $ this ->assertEquals ($ c ->hasValueOneOf (['missing1 ' , 'missing2 ' ]), false );
130133 $ this ->assertEquals ($ c ->hasValueOneOf (['exists_true ' , 'missing ' ]), true );
0 commit comments