PHPUnit_Framework_Assert::assertNotIsWritable PHP Method

assertNotIsWritable() public static method

Asserts that a file/dir exists and is not writable.
public static assertNotIsWritable ( string $filename, string $message = '' )
$filename string
$message string
    public static function assertNotIsWritable($filename, $message = '')
    {
        if (!is_string($filename)) {
            throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
        }
        $constraint = new PHPUnit_Framework_Constraint_Not(new PHPUnit_Framework_Constraint_IsWritable());
        static::assertThat($filename, $constraint, $message);
    }

Usage Example

Example #1
0
 public function isNotWritable()
 {
     $this->isExist();
     Assert::assertNotIsWritable($this->actual, $this->description);
     return $this;
 }
PHPUnit_Framework_Assert