diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..6568a5172 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM php:8.3-fpm + +ARG user +ARG uid + +RUN apt-get update && apt-get install -y \ + libpq-dev \ + unzip \ + git \ + && docker-php-ext-install pdo_pgsql pgsql bcmath \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer + +RUN useradd -G www-data,root -u $uid -d /home/$user $user +RUN mkdir -p /home/$user/.composer && \ + chown -R $user:$user /home/$user + +USER $user diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..b9fab2b1f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,33 @@ +services: + spur-taxes: + image: php:8.3-fpm + container_name: spur-taxes + build: + context: . + args: + user: "${DOCKER_USER}" + uid: "${DOCKER_UID:-1000}" + dockerfile: Dockerfile + volumes: + - ".:/var/www/html" + working_dir: /var/www/html + environment: + - APP_ENV=local + ports: + - "9000:9000" + depends_on: + - spur-taxes-db +# command: bash -c "docker-php-ext-install pdo_pgsql pgsql && php-fpm" + spur-taxes-db: + image: postgis/postgis:15-3.5 + container_name: spur-taxes-db + environment: + POSTGRES_USER: admin + POSTGRES_PASSWORD: password + POSTGRES_DB: laravel-taxes + ports: + - "5435:5432" + volumes: + - spur-taxes-db-data:/var/lib/postgresql/data +volumes: + spur-taxes-db-data: diff --git a/src/Countries/US/Connecticut/ConnecticutUnemployment/V20250101/ConnecticutUnemployment.php b/src/Countries/US/Connecticut/ConnecticutUnemployment/V20250101/ConnecticutUnemployment.php new file mode 100644 index 000000000..c207fc11a --- /dev/null +++ b/src/Countries/US/Connecticut/ConnecticutUnemployment/V20250101/ConnecticutUnemployment.php @@ -0,0 +1,11 @@ +query_runner->addTax(self::TAX_CLASS); + } + + /** + * @dataProvider provideData + */ + public function testWageBase(TestParameters $parameters): void + { + $this->validateWageBase($parameters); + } + + public function testWorkDifferentState(): void + { + $this->validateWorkDifferentState( + self::DATE, + self::LOCATION, + self::TAX_CLASS, + self::TAX_RATE + ); + } + + public function testTaxRate(): void + { + $this->validateTaxRate( + self::DATE, + self::LOCATION, + self::TAX_CLASS, + 0.0321 + ); + } + + public static function provideData(): array + { + return self::wageBaseBoundariesTestCases( + self::DATE, + self::LOCATION, + self::TAX_CLASS, + self::WAGE_BASE, + self::TAX_RATE); + } +}