File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
tests/unit/Codeception/Module Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -263,6 +263,17 @@ public function assertTrue($condition, $message = '')
263263 parent ::assertTrue ($ condition , $ message );
264264 }
265265
266+ /**
267+ * Checks that the condition is NOT true (everything but true)
268+ *
269+ * @param $condition
270+ * @param string $message
271+ */
272+ public function assertNotTrue ($ condition , $ message = '' )
273+ {
274+ parent ::assertNotTrue ($ condition , $ message );
275+ }
276+
266277 /**
267278 * Checks that condition is negative.
268279 *
@@ -274,6 +285,17 @@ public function assertFalse($condition, $message = '')
274285 parent ::assertFalse ($ condition , $ message );
275286 }
276287
288+ /**
289+ * Checks that the condition is NOT false (everything but false)
290+ *
291+ * @param $condition
292+ * @param string $message
293+ */
294+ public function assertNotFalse ($ condition , $ message = '' )
295+ {
296+ parent ::assertNotFalse ($ condition , $ message );
297+ }
298+
277299 /**
278300 * Checks if file exists
279301 *
Original file line number Diff line number Diff line change @@ -19,7 +19,13 @@ public function testAsserts()
1919 $ module ->assertNotNull (false );
2020 $ module ->assertNotNull (0 );
2121 $ module ->assertTrue (true );
22+ $ module ->assertNotTrue (false );
23+ $ module ->assertNotTrue (null );
24+ $ module ->assertNotTrue ('foo ' );
2225 $ module ->assertFalse (false );
26+ $ module ->assertNotFalse (true );
27+ $ module ->assertNotFalse (null );
28+ $ module ->assertNotFalse ('foo ' );
2329 $ module ->assertFileExists (__FILE__ );
2430 $ module ->assertFileNotExists (__FILE__ . '.notExist ' );
2531 $ module ->assertInstanceOf ('Exception ' , new Exception ());
You can’t perform that action at this time.
0 commit comments