More testable record insertion code
An important question: why don’t you want to touch the database in the test? You have a few different options for getting phpunit to play nicely with a database. Doing so lets you test things more thoroughly as you can do assertions that the data has landed in the database as you expected. 

As a starting point, based on what I see in this method, I would recommend adding something along these lines in phpunit.xml within the &lt;php&gt; tag

 &lt;env name="DB_DATABASE" value="testing"/&gt;


And create a database lined up with the “testing” value set in DB_DATABASE. These values equate to .env values, so you can add additional DB_USERNAME, etc values as appropriate. 

You can use the RefreshDatabase trait to reset migrations within your newly created testing database on each test. That is described at https://laravel.com/docs/6.x/database-testing#resetting-the-database-after-each-test 

It looks like you need some Location and Customer data in your database for this job to work. If you don’t already have factories for these models, make some as described at https://laravel.com/docs/6.x/database-testing#writing-factories 

As a starting point you can manually call factories in your test – factory(App\Customer::class)-&gt;create(); will put a factory generated customer into your database. If you need three of them, – factory(App\Customer::class, 3)-&gt;create(); The factory method returns the created entities, so you can do: 

    $customer = factory(App\Customer::class)-&gt;create();
    $locations = factory(App\Location::class, 3)-&gt;create();
    newJob(
     $customer-&gt;id, 
     Arr::get($locations, 0)-&gt;id, 
     Arr::get($locations, 1)-&gt;id, 
     Arr::get($locations, 2)-&gt;id
);


Now the job should be in your testing.jobs table, and you can make an assertion of that:

$this-&gt;assertDatabaseHas(‘jobs’,[
‘customer_id’ =&gt; $customer-&gt;id,
‘location_id_from’ =&gt; Arr::get($locations, 0)-&gt;id,
‘location_id_to’ =&gt; Arr::get($locations, 1)-&gt;id,
‘location_id_ bill’ =&gt; Arr::get($locations, 2)-&gt;id,
]);


Yes there’s a some overhead in getting the database incorporated into your test setup and in writing the factory, but the end result is a more thorough test. Worth it, in my opinion. 

I hope something here helps!