testExceptionThrown(); } public function testExceptionThrown() { $this->expectException(\LogicException::class, function() { throw new \LogicException("Test exception"); }); } }