Black/White List on architecture tests #1034
Closed
DhavalGondaliya9
started this conversation in
Ideas
Replies: 2 comments
-
It looks like you probably want to use the test('models should extend base model')
->expect('App\Models')
->toExtend('App\Models\Model')
->ignoring(['App\Models\User', 'App\Models\Post']); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank You... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have figured out while implementing the model extend architecture test.
We are using our custom model and I want to add a test that no one will extend the Laravel Model directly. But I want to exclude some of the files.
I checked the whole documentation and code. I haven't found it anyway.
For Example :
test('models should extend base model')
->expect('App\Models')
->exclude(['App\Models\User', 'App\Models\Post'])
->toExtend('App\Models\Model');
Beta Was this translation helpful? Give feedback.
All reactions