diff --git a/core/modules/simpletest/simpletest.install b/core/modules/simpletest/simpletest.install
index 9d8e3c7..69868ec 100644
--- a/core/modules/simpletest/simpletest.install
+++ b/core/modules/simpletest/simpletest.install
@@ -15,7 +15,7 @@
  *   https://www.drupal.org/node/2289201 and
  *   https://www.drupal.org/node/2307163 and then decrease this limit.
  */
-const SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT = '320M';
+const SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT = '192M';
 
 /**
  * Implements hook_requirements().
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 4e35b28..7bf821c 100644
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -522,13 +522,6 @@ function simpletest_script_execute_batch($test_classes) {
       $test_ids[] = $test_id;
 
       $test_class = array_shift($test_classes);
-      // Process phpunit tests immediately since they are fast and we don't need
-      // to fork for them.
-      if (is_subclass_of($test_class, '\PHPUnit_Framework_TestCase')) {
-        simpletest_script_run_phpunit($test_id, $test_class);
-        continue;
-      }
-
       // Fork a child process.
       $command = simpletest_script_command($test_id, $test_class);
       $process = proc_open($command, array(), $pipes, NULL, NULL, array('bypass_shell' => TRUE));
@@ -637,11 +630,15 @@ function simpletest_script_run_one_test($test_id, $test_class) {
       $methods = array();
     }
     $test = new $class_name($test_id);
-    $test->dieOnFail = (bool) $args['die-on-fail'];
-    $test->verbose = (bool) $args['verbose'];
-    $test->run($methods);
-
-    simpletest_script_reporter_display_summary($test_class, $test->results);
+    if (is_subclass_of($test_class, '\PHPUnit_Framework_TestCase')) {
+      simpletest_script_run_phpunit($test_id, $test_class);
+    }
+    else {
+      $test->dieOnFail = (bool) $args['die-on-fail'];
+      $test->verbose = (bool) $args['verbose'];
+      $test->run($methods);
+      simpletest_script_reporter_display_summary($test_class, $test->results);
+    }
 
     // Finished, kill this runner.
     exit(0);
@@ -707,6 +704,10 @@ function simpletest_script_command($test_id, $test_class) {
  * @see simpletest_script_run_one_test()
  */
 function simpletest_script_cleanup($test_id, $test_class, $exitcode) {
+  if (strpos($test_class, 'Drupal\\Tests\\') === 0) {
+    // PHPUnit test, move on.
+    return;
+  }
   // Retrieve the last database prefix used for testing.
   list($db_prefix, ) = simpletest_last_test_get($test_id);
 
diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
index 1dfabe3..47f43c9 100644
--- a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
+++ b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
@@ -38,11 +38,12 @@
    */
   protected function setUp() {
     parent::setUp();
+    $this->directory = sys_get_temp_dir() . '/php' . str_replace('\\','_', get_class($this));
 
     $this->secret = $this->randomMachineName();
 
     $this->settings = array(
-      'directory' => sys_get_temp_dir() . '/php',
+      'directory' =>  $this->directory,
       'bin' => 'test',
       'secret' => $this->secret,
     );
@@ -69,7 +70,7 @@ public function testSecurity() {
     $php = new $this->storageClass($this->settings);
     $name = 'simpletest.php';
     $php->save($name, '<?php');
-    $expected_root_directory = sys_get_temp_dir() . '/php/test';
+    $expected_root_directory =  $this->directory . '/test';
     if (substr($name, -4) === '.php') {
       $expected_directory = $expected_root_directory . '/' . substr($name, 0, -4);
     }
