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 = '')
263
263
parent ::assertTrue ($ condition , $ message );
264
264
}
265
265
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
+
266
277
/**
267
278
* Checks that condition is negative.
268
279
*
@@ -274,6 +285,17 @@ public function assertFalse($condition, $message = '')
274
285
parent ::assertFalse ($ condition , $ message );
275
286
}
276
287
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
+
277
299
/**
278
300
* Checks if file exists
279
301
*
Original file line number Diff line number Diff line change @@ -19,7 +19,13 @@ public function testAsserts()
19
19
$ module ->assertNotNull (false );
20
20
$ module ->assertNotNull (0 );
21
21
$ module ->assertTrue (true );
22
+ $ module ->assertNotTrue (false );
23
+ $ module ->assertNotTrue (null );
24
+ $ module ->assertNotTrue ('foo ' );
22
25
$ module ->assertFalse (false );
26
+ $ module ->assertNotFalse (true );
27
+ $ module ->assertNotFalse (null );
28
+ $ module ->assertNotFalse ('foo ' );
23
29
$ module ->assertFileExists (__FILE__ );
24
30
$ module ->assertFileNotExists (__FILE__ . '.notExist ' );
25
31
$ module ->assertInstanceOf ('Exception ' , new Exception ());
You can’t perform that action at this time.
0 commit comments