Support the ongoing development of Laravel.io →
Testing Installation Configuration

Trying out testing in Laravel and have failed miserably.

I'm trying to run phpunit. In my terminal, I run vendor/phpunit/phpunit/phpunit but I get this error:

Parse error: syntax error, unexpected '[', expecting ')' in /vendor/react/promise/src/functions.php on line 68

When I run the same command on another Laravel installation, I get the same error but that it's in the file:

vendor/guzzlehttp/psr7/src/functions.php on line 77

Have I done something wrong? Is there something else that I need to install to get testing to work?

Last updated 2 years ago.
0

Can someone help me out? I can't do any testing at all.

0

php version?

0

It's version 5.5.21.

Last updated 9 years ago.
0

Testing doesn't work with that version of PHP?

0

Does anyone know? I'm really in a pickle.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

jerauf jerauf Joined 16 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.