1<?php 2class Issue2731Test extends PHPUnit\Framework\TestCase 3{ 4 public function testOne() 5 { 6 $this->expectException(Exception::class); 7 $this->expectExceptionMessage(''); 8 9 throw new Exception('message'); 10 } 11} 12