Skip to content

Commit

Permalink
Merge pull request #307 from spurwork/feature/ss-1203-update-ct-for-2025
Browse files Browse the repository at this point in the history
SS-1203 - 2025 CT UI
  • Loading branch information
stevespur authored Jan 13, 2025
2 parents b97b42b + ba80d42 commit 6a85fe3
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
33 changes: 33 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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:
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Appleton\Taxes\Countries\US\Connecticut\ConnecticutUnemployment\V20250101;

use Appleton\Taxes\Countries\US\Connecticut\ConnecticutUnemployment\ConnecticutUnemployment as BaseConnecticutUnemployment;

class ConnecticutUnemployment extends BaseConnecticutUnemployment
{
const FUTA_CREDIT = 0.054;
const WAGE_BASE = 26100;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?php

namespace Appleton\Taxes\Tests\Unit\Countries\US\Connecticut\V20250101;

use Appleton\Taxes\Countries\US\Connecticut\ConnecticutUnemployment\ConnecticutUnemployment;
use Appleton\Taxes\Tests\Unit\Countries\UnemploymentTaxTestCase;
use Appleton\Taxes\Tests\Unit\Countries\TestParameters;

class ConnecticutUnemploymentTest extends UnemploymentTaxTestCase
{
private const string DATE = '2025-01-01';
private const string LOCATION = 'us.connecticut';
private const string TAX_CLASS = ConnecticutUnemployment::class;
private const float TAX_RATE = 0.034;
private const int WAGE_BASE = 2610000;

public function setUp(): void
{
parent::setUp();
$this->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);
}
}

0 comments on commit 6a85fe3

Please sign in to comment.