-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #307 from spurwork/feature/ss-1203-update-ct-for-2025
SS-1203 - 2025 CT UI
- Loading branch information
Showing
4 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
11 changes: 11 additions & 0 deletions
11
src/Countries/US/Connecticut/ConnecticutUnemployment/V20250101/ConnecticutUnemployment.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
60 changes: 60 additions & 0 deletions
60
tests/Unit/Countries/US/Connecticut/V20250101/ConnecticutUnemploymentTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |