---
title: "rector-phpunit/phpunit-narrow-asserts set"
pagination: false
---

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

rector-phpunit's `phpunit-narrow-asserts` set: the Pun lint rules its Rector rules map to, and nothing else.

```toml
[lint]
sets = ["rector-phpunit/phpunit-narrow-asserts"]
```

A rule merged from several Rector rules runs only the rewrites of this set's Rector rules, unless a [preset](/docs/configuration/presets#lint-presets) also turns it on. Rector rules that are format rules in Pun run under `[format]` instead. Laravel, Pest, and PHPUnit rules also need their [extension](/docs/configuration/pun-toml#extensions).

## Rules (13)

| Rule | Rector rules | Status |
| --- | --- | --- |
| [`lint/phpunit/no-assert-same-type-mismatch`](/docs/rules/lint/phpunit/no-assert-same-type-mismatch) | `MatchAssertSameExpectedTypeRector` | Ported |
| [`lint/phpunit/no-negated-assertion`](/docs/rules/lint/phpunit/no-negated-assertion) | `AssertNotOperatorRector` | Ported |
| [`lint/phpunit/prefer-assert-array-has-key`](/docs/rules/lint/phpunit/prefer-assert-array-has-key) | `AssertIssetToSpecificMethodRector` | Ported |
| [`lint/phpunit/prefer-assert-count`](/docs/rules/lint/phpunit/prefer-assert-count) | `AssertCompareOnCountableWithMethodToAssertCountRector` | Ported |
| [`lint/phpunit/prefer-assert-instanceof`](/docs/rules/lint/phpunit/prefer-assert-instanceof) | `AssertInstanceOfComparisonRector` | Ported |
| [`lint/phpunit/prefer-assert-instanceof-over-empty`](/docs/rules/lint/phpunit/prefer-assert-instanceof-over-empty) | `AssertEmptyNullableObjectToAssertInstanceofRector` | Ported |
| [`lint/phpunit/prefer-assert-null-true-false`](/docs/rules/lint/phpunit/prefer-assert-null-true-false) | `AssertSameBoolNullToSpecificMethodRector` | Ported |
| [`lint/phpunit/prefer-assert-same`](/docs/rules/lint/phpunit/prefer-assert-same) | `AssertEqualsToSameRector` | Ported |
| [`lint/phpunit/prefer-assert-string-contains`](/docs/rules/lint/phpunit/prefer-assert-string-contains) | `AssertFalseStrposToContainsRector` | Ported |
| [`lint/phpunit/prefer-assert-true-false`](/docs/rules/lint/phpunit/prefer-assert-true-false) | `AssertSameTrueFalseToAssertTrueFalseRector` | Ported |
| [`lint/phpunit/prefer-comparison-assertion`](/docs/rules/lint/phpunit/prefer-comparison-assertion) | `AssertComparisonToSpecificMethodRector` | Ported |
| [`lint/phpunit/prefer-property-assertions`](/docs/rules/lint/phpunit/prefer-property-assertions) | `AssertArrayCastedObjectToAssertSameRector` | Ported |
| [`lint/phpunit/prefer-specific-true-false-assertion`](/docs/rules/lint/phpunit/prefer-specific-true-false-assertion) | `AssertTrueFalseToSpecificMethodRector` | Ported |
