title: phpunit, laravel: Cannot use "parent" when current class scope has no parent
body: <p>I'm using PHPUnit 6.5.13 and Laravel 5.5 on PHP 7.4. I recently upgraded from PHP 7.2 to 7.4. and it seems like that triggered the error. </p>
  
  <p>In my test I use <code>$this-&gt;expectsEvents</code> in order to test that an event is fired. The test class looks a little like this:</p>
  
  <pre><code>namespace Tests\Feature;
  use Tests\TestCase;
  use App\Events\OrderReSent;
  
  class MyEventTest extends TestCase {
      /** @test */
      public function authenticated_client_can_resend()
      {
          $this-&gt;expectsEvents(OrderReSent::class); // there is some more code but this is the line that returns the error
      }
  }
  </code></pre>
  
  <p>OrderReSent looks like this (I've tried commenting out broadcastOn and remove InteractsWithSockets use, no change in result):</p>
  
  <pre><code>namespace App\Events;
  
  use Illuminate\Broadcasting\Channel;
  use Illuminate\Queue\SerializesModels;
  use Illuminate\Broadcasting\PrivateChannel;
  use Illuminate\Broadcasting\PresenceChannel;
  use Illuminate\Foundation\Events\Dispatchable;
  use Illuminate\Broadcasting\InteractsWithSockets;
  use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
  
  class OrderReSent
  {
      use Dispatchable, InteractsWithSockets, SerializesModels;
  
      public $invoiceId;
  
      public function __construct($invoiceId)
      {
          $this-&gt;invoiceId = $invoiceId;
      }
  
      public function broadcastOn()
      {
          return new PrivateChannel('channel-name');
      }
  }
  </code></pre>
  
  <p>The only place I see parent::__construct being called is in <code>Illuminate\Broadcasting\PrivateChannel</code>, which extends Illuminate\Broadcasting\Channel (and it is a child class, so I don't understand why it would throw this error):</p>
  
  <pre><code>namespace Illuminate\Broadcasting;
  
  class PrivateChannel extends Channel
  {
      /**
       * Create a new channel instance.
       *
       * @param  string  $name
       * @return void
       */
      public function __construct($name)
      {
          parent::__construct('private-'.$name);
      }
  }
  </code></pre>
  
  <p>The stacktrace looks like this and makes me believe Mockery is the culprit:</p>
  
  <pre><code>1) Tests\Feature\MyEventTest::authenticated_client_can_resend
  ErrorException: Cannot use "parent" when current class scope has no parent
  
  /project-root/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php:16
  /project-root/vendor/mockery/mockery/library/Mockery/Loader/EvalLoader.php:16
  /project-root/vendor/mockery/mockery/library/Mockery/Container.php:219
  /project-root/vendor/mockery/mockery/library/Mockery.php:89
  /project-root/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php:99
  /project-root/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php:54
  /project-root/tests/Feature/MyEventTest.php:29
  </code></pre>