setUp(); } catch ( \Throwable $_ ) { // FIXME handle } $calls++; } $res = parent::run( $result ); if ( is_callable( [ $this, 'tearDown' ] ) ) { try { $this->tearDown(); } catch ( \Throwable $_ ) { // FIXME handle } $calls++; } if ( !$calls ) { throw new LogicException( get_class( $this ) . " uses neither setUp() nor tearDown(), so it doesn't need SuiteEventsTrait" ); } return $res; } }