---
title: "How can I fix a PHPUnit error?"
date: "2025-05-27T09:46:38+00:00"
summary: "Troubleshoot PHPUnit errors in Drupal: Learn how to fix the \"Class TraversableElement not found\" issue and add missing packages."
image:
type: "article"
url: "/acquia-cloud-platform/add-ons/code-studio/help/69311-how-can-i-fix-phpunit-error"
id: "4bf8312c-2924-4d03-9485-7425fd6f52af"
---

**Description**

**Build stage**

**Job**

**Error message**

**Category**

**Responsibility**

[Test Drupal](https://docs.acquia.com/acquia-cloud-platform/add-ons/code-studio/docs/customizing-code-studio/drupal-auto-devops/autodevops-jobs#section-test-drupal-stage)

[Test Drupal](https://docs.acquia.com/acquia-cloud-platform/add-ons/code-studio/docs/customizing-code-studio/drupal-auto-devops/autodevops-jobs#section-test-drupal-job)

`Class "Behat\Mink\Element\TraversableElement" not found`

Application

Customer

**Potential cause**

Certain packages are missing from your project.

**Solution**

If your application runs on the [current Drupal version](https://docs.acquia.com/service-offerings/guide/software-life-cycle#supported-drupal-version), add the `core-dev` package to your project:

    composer require --dev drupal/core-dev