Level 102
Are you sure you are using the same type of database in testing as in dev? You cannot use sqlite if you use raw
Summer Sale! All accounts are 50% off this week.
Do any of you guys know how to test when the controller is using DB::Raw("ST_GeomFromGeoJSON('" . $request['geometry'] . "')") to input a geometry value? Because when I'm trying to test this controller I keep on getting this error:
PDOException: SQLSTATE[HY000]: General error: 1 no such function: ST_GeomFromGeoJSON in /media/deanira/TEAM-SSD/applications/drainit-testing/drainit-backend-testing/vendor/laravel/framework/src/Illuminate/Database/Connection.php:495
@deanira yeah. Set up a database locally that you can use and set it up inside config/database.php
And then set phpunit to use it here https://github.com/laravel/laravel/blob/9.x/phpunit.xml#L24
Please or to participate in this conversation.