Skip to content

Commit

Permalink
docs for int and string backed enums
Browse files Browse the repository at this point in the history
  • Loading branch information
JonPurvis committed Dec 8, 2023
1 parent e4f6ca4 commit 9f34418
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions arch-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ Architecture testing enables you to specify expectations that test whether your
- [`toBeAbstract()`](#expect-toBeAbstract)
- [`toBeClasses()`](#expect-toBeClasses)
- [`toBeEnums()`](#expect-toBeEnums)
- [`toBeIntBackedEnums()`](#expect-toBeIntBackedEnums)
- [`toBeInterfaces()`](#expect-toBeInterfaces)
- [`toBeInvokable()`](#expect-toBeInvokable)
- [`toBeFinal()`](#expect-toBeFinal)
- [`toBeReadonly()`](#expect-toBeReadonly)
- [`toBeStringBackedEnums()`](#expect-toBeStringBackedEnums)
- [`toBeTraits()`](#expect-toBeTraits)
- [`toBeUsed()`](#expect-toBeUsed)
- [`toBeUsedIn()`](#expect-toBeUsedIn)
Expand Down Expand Up @@ -73,6 +75,17 @@ test('app')
->toBeEnums();
```

<a name="expect-toBeIntBackedEnums"></a>
### `toBeIntBackedEnums()`

The `toBeIntBackedEnums()` method may be used to ensure that all files within a given namespace are backed by an integer.

```php
test('app')
->expect('App\Enums')
->toBeIntBackedEnums();
```

<a name="expect-toBeInterfaces"></a>
### `toBeInterfaces()`

Expand Down Expand Up @@ -146,6 +159,17 @@ test('app')
->toBeReadonly();
```

<a name="expect-toBeStringBackedEnums"></a>
### `toBeStringBackedEnums()`

The `toBeStringBackedEnums()` method may be used to ensure that all files within a given namespace are backed by a string.

```php
test('app')
->expect('App\Enums')
->toBeStringBackedEnums();
```

<a name="expect-toBeUsed"></a>
### `toBeUsed()`

Expand Down

0 comments on commit 9f34418

Please sign in to comment.