/** * @depends testExist * @return void */ public function testCreateNewFile() { $pathname = __DIR__ . '/tmp/new_file.txt'; if (is_file($pathname)) { unlink($pathname); } $fileObject = new File($pathname); $this->assertTrue($fileObject->createNewFile()); $this->assertTrue($fileObject->isFile()); }