text: <?php declare(strict_types=1);
  /**
   * This file is part of the Yasumi package.
   *
   * Copyright (c) 2015 - 2020 AzuyaLabs
   *
   * For the full copyright and license information, please view the LICENSE
   * file that was distributed with this source code.
   *
   * @author Sacha Telgenhof <me@sachatelgenhof.com>
   */
  
  namespace Yasumi\tests\Switzerland\Uri;
  
  use DateTime;
  use Exception;
  use ReflectionException;
  use Yasumi\Holiday;
  use Yasumi\tests\YasumiTestCaseInterface;
  
  /**
   * Class for testing St. Stephen's Day in Uri (Switzerland).
   */
  class StStephensDayTest extends UriBaseTestCase implements YasumiTestCaseInterface
  {
      /**
       * The name of the holiday to be tested
       */
      public const HOLIDAY = 'stStephensDay';
  
      /**
       * Tests the holiday defined in this test.
       *
       * @dataProvider HolidayDataProvider
       *
       * @param int $year the year for which the holiday defined in this test needs to be tested
       * @param DateTime $expected the expected date
       *
       * @throws ReflectionException
       */
      public function testHoliday($year, $expected): void
      {
          $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected);
      }
  
      /**
       * Returns a list of random test dates used for assertion of the holiday defined in this test
       *
       * @return array list of test dates for the holiday defined in this test
       * @throws Exception
       */
      public function HolidayDataProvider(): array
      {
          return $this->generateRandomDates(12, 26, self::TIMEZONE);
      }
  
      /**
       * Tests the translated name of the holiday defined in this test.
       * @throws ReflectionException
       */
      public function testTranslation(): void
      {
          $this->assertTranslatedHolidayName(
              self::REGION,
              self::HOLIDAY,
              $this->generateRandomYear(),
              [self::LOCALE => 'Stephanstag']
          );
      }
  
      /**
       * Tests type of the holiday defined in this test.
       * @throws ReflectionException
       */
      public function testHolidayType(): void
      {
          $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OTHER);
      }
  }
  