Issue #2331151 by David_Rothstein: Remove leftover code in testFileValidateSize() which runs the tests as a specific user.

8.0.x
Alex Pott 2014-09-15 11:43:40 +01:00
parent db6bd07b18
commit ee91cb0785
1 changed files with 0 additions and 6 deletions

View File

@ -140,12 +140,6 @@ class ValidatorTest extends FileManagedUnitTestBase {
* Test file_validate_size(). * Test file_validate_size().
*/ */
function testFileValidateSize() { 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. // Create a file with a size of 1000 bytes, and quotas of only 1 byte.
$file = entity_create('file', array('filesize' => 1000)); $file = entity_create('file', array('filesize' => 1000));
$errors = file_validate_size($file, 0, 0); $errors = file_validate_size($file, 0, 0);