olderDbExists()); self::assertEquals( 'An error occurred while updating geolocation database, and an older version could not be found', $e->getMessage(), ); self::assertEquals(0, $e->getCode()); self::assertEquals($prev, $e->getPrevious()); } public function provideCreateArgs(): iterable { yield 'older DB and no prev' => [true, null]; yield 'older DB and prev' => [true, new RuntimeException('prev')]; yield 'no older DB and no prev' => [false, null]; yield 'no older DB and prev' => [false, new Exception('prev')]; } }