PHPUnitTest is missing the file_managed table?
Ugh... Forgot to install the entitySchema. 

This is how to do it in the setup method

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();

    $this-&gt;installConfig('system');
    $this-&gt;installConfig('graphql');
    $this-&gt;installConfig('file');
    $this-&gt;installConfig('image');
    $this-&gt;installConfig('user');
    $this-&gt;installEntitySchema('user');
    $this-&gt;installEntitySchema('file');


    Role::load(RoleInterface::AUTHENTICATED_ID)
      -&gt;grantPermission('execute graphql requests')
      -&gt;grantPermission('create media')
      -&gt;grantPermission('view media')
      -&gt;grantPermission('access content')
      -&gt;grantPermission('bypass node access')
      -&gt;grantPermission('create url aliases')
      -&gt;save();
  }