---
title: "lint/phpunit/prefer-camel-case-test-names"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="lint/phpunit/prefer-camel-case-test-names" />

Not in any preset. Needs the [`phpunit` extension](/docs/configuration/pun-toml#extensions). Unsafe fix: it can change behavior.

## What it does

Changes PHPUnit test methods to camel case

## Configuration

```toml title="pun.toml"
[lint.rules]
"phpunit/prefer-camel-case-test-names" = "error"
```

To skip it in some files or lines, add an [override](/docs/configuration/pun-toml#lint) or an [ignore comment](/docs/configuration/ignore-comments).

## Replaces

- [`PreferTestsWithCamelCase`](https://getrector.com/rule-detail/prefer-tests-with-camel-case-rector) (rector-phpunit)

## Linked rules

- Conflicts with [`lint/phpunit/prefer-snake-case-test-names`](/docs/rules/lint/phpunit/prefer-snake-case-test-names). You cannot enable both.

[More lint/phpunit rules](/docs/rules/lint/phpunit) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
