public function testDelete_filled() { $dir = new \r8\FileSys\Dir($this->dir); try { $dir->delete(); $this->fail("An expected exception was not thrown"); } catch (\r8\Exception\FileSystem $err) { $this->assertSame("Unable to delete directory", $err->getMessage()); } $this->assertTrue(is_dir($dir)); }