4 years ago

Using namespace with Laravels TestCase (integrated testing)

Posted 4 years ago by nivv


The reason I'm asking this is because php-cs-fixer spits out an error for all my test classes. The reason is that the test classes doesn't have a namespace, which they don't.

I've tried adding a namespace myself, but that doesn't seem to work. The error I get is class must be in a namespace of at least one level

It's explained here (rule 3):

I've tried updating my composer file to have a namespace as the regular App has, but then the TestCase class is not found.

Any ideas?


Alt text

Please sign in or create an account to participate in this conversation.