Skip to content

Commit be50d63

Browse files
committed
Add test for anonymous class
1 parent 99939d5 commit be50d63

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Latest stable version](https://img.shields.io/packagist/v/kubawerlos/php-cs-fixer-custom-fixers.svg?label=current%20version)](https://packagist.org/packages/kubawerlos/php-cs-fixer-custom-fixers)
66
[![PHP version](https://img.shields.io/packagist/php-v/kubawerlos/php-cs-fixer-custom-fixers.svg)](https://php.net)
77
[![License](https://img.shields.io/github/license/kubawerlos/php-cs-fixer-custom-fixers.svg)](LICENSE)
8-
![Tests](https://img.shields.io/badge/tests-3733-brightgreen.svg)
8+
![Tests](https://img.shields.io/badge/tests-3734-brightgreen.svg)
99
[![Downloads](https://img.shields.io/packagist/dt/kubawerlos/php-cs-fixer-custom-fixers.svg)](https://packagist.org/packages/kubawerlos/php-cs-fixer-custom-fixers)
1010

1111
[![CI status](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/actions/workflows/ci.yaml/badge.svg)](https://github.com/kubawerlos/php-cs-fixer-custom-fixers/actions/workflows/ci.yaml)

tests/Fixer/TypedClassConstantFixerTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ class Bar {
146146
PHP,
147147
];
148148

149+
yield 'anonymous class' => [
150+
'<?php new class () { public const int BAR = 0; };',
151+
'<?php new class () { public const BAR = 0; };',
152+
];
153+
149154
yield 'unknown other constant' => [
150155
'<?php class Foo { public const mixed BAR = CONSTANT_FROM_FAR_AWAY; }',
151156
'<?php class Foo { public const BAR = CONSTANT_FROM_FAR_AWAY; }',

0 commit comments

Comments
 (0)