How to throw an Exception with a Mock object on method call in PHPUnit

Code
<?php

use PHPUnit\Framework\TestCase;

class 
ExceptionMockTest extends TestCase
{
    public function 
testMockException() : void
    
{
        
$mock $this->createMock('Fooable');
        
$mock->expects($this->once())
            ->
method('connect')
            ->
willThrowException(new Exception('Expected Exception was thrown'));
        
        
$mock->connect();
    }
}

interface 
Fooable
{
    public function 
connect();
}
Result
Time: 268 ms, Memory: 16.00 MB

There was 1 error:

1) ExceptionMockTest::testMockException
Expected Exception was thrown

PhpunitExec.php:22

ERRORS!
Tests: 1, Assertions: 0, Errors: 1.
Used Versions
PHP 7.3, Zend 3.0, Symfony 4.3, Laravel 5.8, PHPUnit 8.0, Doctrine 2.10