file directory location

indytechcook - September 4, 2009 - 16:43
Project:SimpleTest
Version:6.x-2.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:boombatower
Status:closed
Description

First, thanks for a great module.

I have a questions about the use if "file_directory_path()" as the "originalFileDirecotry" and it's use in DrupalWebTestCase->drupalGetTestFile.

This points to the sites 'files/simpletest' directory. Since the copying of the files could fail in the module install (like mine did), I propose that we add a check to see if the file exists. If it doesn't, check the drupal_get_path('module', 'simpletest') . '/files' location. Otherwise you get alot of failure in many different simpletest module scripts, including imagefield and fieldfield.

I'm attaching a patch for this.

#1

indytechcook - September 4, 2009 - 16:44

Attaching patch.

AttachmentSizeStatusTest resultOperations
simpletest-568526.patch961 bytesIgnoredNoneNone

#2

indytechcook - September 9, 2009 - 23:41
Status:active» needs review

setting to needs review.

#3

boombatower - September 14, 2009 - 18:29

Perhaps we should just make a failure message during install?

#4

boombatower - September 14, 2009 - 19:25
Status:needs review» postponed (maintainer needs more info)

Also, how does it fail. If it has write access and all it should work?

#5

indytechcook - September 21, 2009 - 17:10

It failed during the install profile. I'm not exactly sure how it failed. I'll step through with the debugger.

I had first thought about giving the ability to specify a file location which could be useful for other modules.

Also, how does it fail. If it has write access and all it should work?

That is a very good question. I didn't find any good reason why it failed, my only thought is that it had something to do with the install profile.

#6

boombatower - November 6, 2009 - 21:53
Assigned to:Anonymous» boombatower
Status:postponed (maintainer needs more info)» closed

Please re-open if you have more details.

 
 

Drupal is a registered trademark of Dries Buytaert.