From ee91cb0785c552c8aa79bba810fcf4d47913a31c Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Mon, 15 Sep 2014 11:43:40 +0100 Subject: [PATCH] Issue #2331151 by David_Rothstein: Remove leftover code in testFileValidateSize() which runs the tests as a specific user. --- core/modules/file/src/Tests/ValidatorTest.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/modules/file/src/Tests/ValidatorTest.php b/core/modules/file/src/Tests/ValidatorTest.php index b1824b2eea8..4b00a9400f0 100644 --- a/core/modules/file/src/Tests/ValidatorTest.php +++ b/core/modules/file/src/Tests/ValidatorTest.php @@ -140,12 +140,6 @@ class ValidatorTest extends FileManagedUnitTestBase { * Test file_validate_size(). */ function testFileValidateSize() { - // Run these tests as a regular user. - $user = entity_create('user', array('uid' => 2, 'name' => $this->randomMachineName())); - $user->enforceIsNew(); - $user->save(); - \Drupal::currentUser()->setAccount($user); - // Create a file with a size of 1000 bytes, and quotas of only 1 byte. $file = entity_create('file', array('filesize' => 1000)); $errors = file_validate_size($file, 0, 0);