/** * @test */ public function itShouldCheckIfNotOverwritingExistingFile() { $this->assertFalse(FileUploadValidation::notOverwritingExistingFile('image', \realpath(\dirname(__FILE__)) . '/resources')); $_FILES['image']['name'] = 'a.png'; $this->assertTrue(FileUploadValidation::notOverwritingExistingFile('image', \realpath(\dirname(__FILE__)) . '/resources')); }
/** * @test */ public function testFilesVariableEmptyForNotOverwritingExistingFileMethod() { $this->assertFalse(FileUploadValidation::notOverwritingExistingFile('property', './')); }