diff options
author | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-11-23 19:43:49 +0000 |
---|---|---|
committer | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-11-23 19:43:49 +0000 |
commit | 8f2d3255c30320ab06c2081cd4d7e446e90747cf (patch) | |
tree | 04c594a48d5c69a1a04813e7fdfc23c720a10002 /engine/tests | |
parent | a13dcbfbd2f47aeae09ec2270d36c1131e28362e (diff) | |
download | elgg-8f2d3255c30320ab06c2081cd4d7e446e90747cf.tar.gz elgg-8f2d3255c30320ab06c2081cd4d7e446e90747cf.tar.bz2 |
Deleting a user will remove all user files.
Fixes #607
git-svn-id: http://code.elgg.org/elgg/trunk@3700 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/tests')
-rw-r--r-- | engine/tests/objects/filestore.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engine/tests/objects/filestore.php b/engine/tests/objects/filestore.php index a262a7c3f..e20137187 100644 --- a/engine/tests/objects/filestore.php +++ b/engine/tests/objects/filestore.php @@ -69,18 +69,23 @@ class ElggCoreFilestoreTest extends ElggCoreUnitTest { $user = $this->createTestUser(); $created = date('Y/m/d', $user->time_created); - // setup a test file; no need to save + // setup a test file $file = new ElggFile(); $file->owner_guid = $user->guid; $file->setFilename('testing/filestore.txt'); + $file->open('write'); + $file->write('Testing!'); + $this->assertTrue($file->close()); // ensure filename and path is expected $filename = $file->getFilenameOnFilestore($file); $filepath = "$CONFIG->dataroot$created/$user->guid/testing/filestore.txt"; $this->assertIdentical($filename, $filepath); + $this->assertTrue(file_exists($filepath)); - // clean up user + // ensure file removed on user delete $user->delete(); + $this->assertFalse(file_exists($filepath)); } |