13
13
14
14
use PHPUnit \Framework \Constraint \IsEqual ;
15
15
use PHPUnit \Framework \Constraint \LogicalNot ;
16
+ use PHPUnit \Framework \Constraint \RegularExpression ;
16
17
use PHPUnit \Framework \Constraint \StringContains ;
17
18
use PHPUnit \Framework \Constraint \TraversableContains ;
18
19
@@ -276,6 +277,17 @@ public static function assertNotIsReadable($filename, $message = '')
276
277
static ::assertFalse (is_readable ($ filename ), $ message ? $ message : "Failed asserting that $ filename is not readable. " );
277
278
}
278
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
+
279
291
/**
280
292
* @param string $filename
281
293
* @param string $message
@@ -300,6 +312,17 @@ public static function assertNotIsWritable($filename, $message = '')
300
312
static ::assertFalse (is_writable ($ filename ), $ message ? $ message : "Failed asserting that $ filename is not writable. " );
301
313
}
302
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
+
303
326
/**
304
327
* @param string $directory
305
328
* @param string $message
@@ -324,6 +347,17 @@ public static function assertDirectoryNotExists($directory, $message = '')
324
347
static ::assertFalse (is_dir ($ directory ), $ message ? $ message : "Failed asserting that $ directory does not exist. " );
325
348
}
326
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
+
327
361
/**
328
362
* @param string $directory
329
363
* @param string $message
@@ -348,6 +382,17 @@ public static function assertDirectoryNotIsReadable($directory, $message = '')
348
382
static ::assertNotIsReadable ($ directory , $ message );
349
383
}
350
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
+
351
396
/**
352
397
* @param string $directory
353
398
* @param string $message
@@ -372,6 +417,17 @@ public static function assertDirectoryNotIsWritable($directory, $message = '')
372
417
static ::assertNotIsWritable ($ directory , $ message );
373
418
}
374
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
+
375
431
/**
376
432
* @param string $filename
377
433
* @param string $message
@@ -396,6 +452,17 @@ public static function assertFileNotExists($filename, $message = '')
396
452
static ::assertFalse (file_exists ($ filename ), $ message ? $ message : "Failed asserting that $ filename does not exist. " );
397
453
}
398
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
+
399
466
/**
400
467
* @param string $filename
401
468
* @param string $message
@@ -420,6 +487,17 @@ public static function assertFileNotIsReadable($filename, $message = '')
420
487
static ::assertNotIsReadable ($ filename , $ message );
421
488
}
422
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
+
423
501
/**
424
502
* @param string $filename
425
503
* @param string $message
@@ -443,4 +521,39 @@ public static function assertFileNotIsWritable($filename, $message = '')
443
521
static ::assertFileExists ($ filename , $ message );
444
522
static ::assertNotIsWritable ($ filename , $ message );
445
523
}
524
+
525
+ /**
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
540
+ *
541
+ * @return void
542
+ */
543
+ public static function assertMatchesRegularExpression ($ pattern , $ string , $ message = '' )
544
+ {
545
+ static ::assertRegExp ($ pattern , $ string , $ message );
546
+ }
547
+
548
+ /**
549
+ * @param string $pattern
550
+ * @param string $string
551
+ * @param string $message
552
+ *
553
+ * @return void
554
+ */
555
+ public static function assertDoesNotMatchRegularExpression ($ pattern , $ string , $ message = '' )
556
+ {
557
+ static ::assertNotRegExp ($ message , $ string , $ message );
558
+ }
446
559
}
0 commit comments