public function testPurge_cantDeleteDir() { $dir = new \r8\FileSys\Dir($this->dir); chmod($this->dir . "/second", 4440); try { $dir->purge(); $this->fail("An expected exception was not thrown"); } catch (\r8\Exception\FileSystem $err) { $this->assertSame("Unable to delete path", $err->getMessage()); } }