testing – How can I set up an a SQLite memory database to improve PHPUnit test speeds?

I’m trying to speed up a functional Drupal test.
Given a test…

  public function the_front_page_loads_for_anonymous_users() {
      ->set('page.front', '/node')


    $assert = $this->assertSession();
    $assert->pageTextContains('Welcome to Drupal');
    $assert->pageTextContains('No front page content has been created yet.');

This test runs really slow against my database … 2+ mins.

If I use a test sqlite database, it drops to around 1.6 mins
<env name="SIMPLETEST_DB" value="sqlite://localhost/logs/test.sqlite"/>

If I use a in-memory database, <env name="SIMPLETEST_DB" value="sqlite://localhost/:memory:"/>, Drupal detects no database and runs install.php

How can I set up an sqlite memory database to improve test speeds?