Code Duplication    Length = 6-6 lines in 2 locations

tests/filesystem/FileTest.php 1 location

@@ 432-437 (lines=6) @@
429
430
		/* Create a test files for each of the fixture references */
431
		$fileIDs = $this->allFixtureIDs('File');
432
		foreach($fileIDs as $fileID) {
433
			$file = DataObject::get_by_id('File', $fileID);
434
			$fh = fopen(BASE_PATH."/$file->Filename", "w");
435
			fwrite($fh, str_repeat('x',1000000));
436
			fclose($fh);
437
		}
438
439
		// Conditional fixture creation in case the 'cms' module is installed
440
		if(class_exists('ErrorPage')) {

tests/filesystem/FolderTest.php 1 location

@@ 269-274 (lines=6) @@
266
267
		// Create a test files for each of the fixture references
268
		$fileIDs = $this->allFixtureIDs('File');
269
		foreach($fileIDs as $fileID) {
270
			$file = DataObject::get_by_id('File', $fileID);
271
			$fh = fopen(BASE_PATH."/$file->Filename", "w");
272
			fwrite($fh, str_repeat('x',1000000));
273
			fclose($fh);
274
		}
275
	}
276
277
	public function tearDown() {