How to mock static methods of a Laravel Eloquent model?
<p>I have in my code a line like this:</p>

<pre><code>ModelName::create($data);
</code></pre>

<p>where ModelName is just an <code>Eloquent</code> model. Is there a way to mock this call inside a unit test? I tried with:</p>

<pre><code>$client_mock = \Mockery::mock('Eloquent','App\Models\ModelName');
$client_mock-&gt;shouldReceive('create')
            -&gt;with($data)-&gt;andReturns($returnValue);
</code></pre>

<p>but it doesn't work.</p>