Skip to content

Commit bccdb1b

Browse files
authored
ci(tests): fix workflow (#20)
* ci: remove filament support * chore: random change to trigger tests * Revert "chore: random change to trigger tests" This reverts commit 38473c5. * chore: fix country tests this fixes e.g. Failed asserting that two strings are equal. -'041' +'41' * chore: format
1 parent 9ce5b03 commit bccdb1b

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/test-runner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565

6666
- name: Install dependencies
6767
run: |
68-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "filament/support:^3.3" --no-interaction --no-update
68+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
6969
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress --no-interaction
7070
7171
- name: Run test suite

src/Models/Country.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,18 @@ protected static function newFactory(): CountryFactory
9090
{
9191
return CountryFactory::new();
9292
}
93+
94+
/**
95+
* Ensure numeric code is always stored as a 3-character, zero-padded string.
96+
*/
97+
public function setNumCodeAttribute($value): void
98+
{
99+
if ($value === null || $value === '') {
100+
$this->attributes['num_code'] = null;
101+
102+
return;
103+
}
104+
105+
$this->attributes['num_code'] = str_pad((string) $value, 3, '0', STR_PAD_LEFT);
106+
}
93107
}

0 commit comments

Comments
 (0)