Check we get the correct class from toArray
Require for Laravel handler
Laravel handler and tests