@@ -277,6 +277,17 @@ public static function assertNotIsReadable($filename, $message = '')
277
277
static ::assertFalse (is_readable ($ filename ), $ message ? $ message : "Failed asserting that $ filename is not readable. " );
278
278
}
279
279
280
+ /**
281
+ * @param string $filename
282
+ * @param string $message
283
+ *
284
+ * @return void
285
+ */
286
+ public static function assertIsNotReadable ($ filename , $ message = '' )
287
+ {
288
+ static ::assertNotIsReadable ($ filename , $ message );
289
+ }
290
+
280
291
/**
281
292
* @param string $filename
282
293
* @param string $message
@@ -301,6 +312,17 @@ public static function assertNotIsWritable($filename, $message = '')
301
312
static ::assertFalse (is_writable ($ filename ), $ message ? $ message : "Failed asserting that $ filename is not writable. " );
302
313
}
303
314
315
+ /**
316
+ * @param string $filename
317
+ * @param string $message
318
+ *
319
+ * @return void
320
+ */
321
+ public static function assertIsNotWritable ($ filename , $ message = '' )
322
+ {
323
+ static ::assertNotIsWritable ($ filename , $ message );
324
+ }
325
+
304
326
/**
305
327
* @param string $directory
306
328
* @param string $message
@@ -325,6 +347,17 @@ public static function assertDirectoryNotExists($directory, $message = '')
325
347
static ::assertFalse (is_dir ($ directory ), $ message ? $ message : "Failed asserting that $ directory does not exist. " );
326
348
}
327
349
350
+ /**
351
+ * @param string $directory
352
+ * @param string $message
353
+ *
354
+ * @return void
355
+ */
356
+ public static function assertDirectoryDoesNotExist ($ directory , $ message = '' )
357
+ {
358
+ static ::assertDirectoryNotExists ($ directory , $ message );
359
+ }
360
+
328
361
/**
329
362
* @param string $directory
330
363
* @param string $message
@@ -349,6 +382,17 @@ public static function assertDirectoryNotIsReadable($directory, $message = '')
349
382
static ::assertNotIsReadable ($ directory , $ message );
350
383
}
351
384
385
+ /**
386
+ * @param string $directory
387
+ * @param string $message
388
+ *
389
+ * @return void
390
+ */
391
+ public static function assertDirectoryIsNotReadable ($ directory , $ message = '' )
392
+ {
393
+ static ::assertDirectoryNotIsReadable ($ directory , $ message );
394
+ }
395
+
352
396
/**
353
397
* @param string $directory
354
398
* @param string $message
@@ -373,6 +417,17 @@ public static function assertDirectoryNotIsWritable($directory, $message = '')
373
417
static ::assertNotIsWritable ($ directory , $ message );
374
418
}
375
419
420
+ /**
421
+ * @param string $directory
422
+ * @param string $message
423
+ *
424
+ * @return void
425
+ */
426
+ public static function assertDirectoryIsNotWritable ($ directory , $ message = '' )
427
+ {
428
+ static ::assertDirectoryNotIsWritable ($ directory , $ message );
429
+ }
430
+
376
431
/**
377
432
* @param string $filename
378
433
* @param string $message
@@ -397,6 +452,17 @@ public static function assertFileNotExists($filename, $message = '')
397
452
static ::assertFalse (file_exists ($ filename ), $ message ? $ message : "Failed asserting that $ filename does not exist. " );
398
453
}
399
454
455
+ /**
456
+ * @param string $filename
457
+ * @param string $message
458
+ *
459
+ * @return void
460
+ */
461
+ public static function assertFileDoesNotExist ($ filename , $ message = '' )
462
+ {
463
+ static ::assertFileNotExists ($ filename , $ message );
464
+ }
465
+
400
466
/**
401
467
* @param string $filename
402
468
* @param string $message
@@ -421,6 +487,17 @@ public static function assertFileNotIsReadable($filename, $message = '')
421
487
static ::assertNotIsReadable ($ filename , $ message );
422
488
}
423
489
490
+ /**
491
+ * @param string $filename
492
+ * @param string $message
493
+ *
494
+ * @return void
495
+ */
496
+ public static function assertFileIsNotReadable ($ filename , $ message = '' )
497
+ {
498
+ static ::assertFileNotIsReadable ($ filename , $ message );
499
+ }
500
+
424
501
/**
425
502
* @param string $filename
426
503
* @param string $message
@@ -446,22 +523,37 @@ public static function assertFileNotIsWritable($filename, $message = '')
446
523
}
447
524
448
525
/**
449
- * Asserts that a string matches a given regular expression.
526
+ * @param string $filename
527
+ * @param string $message
528
+ *
529
+ * @return void
530
+ */
531
+ public static function assertFileIsNotWritable ($ filename , $ message = '' )
532
+ {
533
+ static ::assertFileNotIsWritable ($ filename , $ message );
534
+ }
535
+
536
+ /**
537
+ * @param string $pattern
538
+ * @param string $string
539
+ * @param string $message
450
540
*
541
+ * @return void
542
+ */
543
+ public static function assertMatchesRegularExpression ($ pattern , $ string , $ message = '' )
544
+ {
545
+ static ::assertRegExp ($ pattern , $ string , $ message );
546
+ }
547
+
548
+ /**
451
549
* @param string $pattern
452
550
* @param string $string
453
551
* @param string $message
454
552
*
455
553
* @return void
456
554
*/
457
- public function assertMatchesRegularExpression ($ pattern , $ string , $ message = '' )
555
+ public static function assertDoesNotMatchRegularExpression ($ pattern , $ string , $ message = '' )
458
556
{
459
- static ::assertThat (
460
- $ string ,
461
- new LogicalNot (
462
- new RegularExpression ($ pattern )
463
- ),
464
- $ message
465
- );
557
+ static ::assertNotRegExp ($ message , $ string , $ message );
466
558
}
467
559
}
0 commit comments