Skip to content

Commit bca53a5

Browse files
fix(import): fix remaining unit test failures
AI-assistant: Copilot 1.0.6 (Claude Sonnet 4.6) Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
1 parent 53d0931 commit bca53a5

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

lib/Db/Column.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public function jsonSerialize(): array {
309309
}
310310

311311
public function getCustomSettingsArray(): array {
312-
return json_decode($this->customSettings, true) ?: [];
312+
return json_decode($this->customSettings ?? '{}', true) ?: [];
313313
}
314314

315315
/**

tests/unit/Service/ApplySchemeServiceTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ private function makeView(int $id, string $title): View {
7777
$view->setTitle($title);
7878
$view->setEmoji(null);
7979
$view->setDescription(null);
80-
$view->setFilter([]);
81-
$view->setSort([]);
82-
$view->setColumnSettings([]);
80+
$view->setFilterArray([]);
81+
$view->setSortArray([]);
82+
$view->setColumnsArray([]);
8383
return $view;
8484
}
8585

@@ -252,7 +252,7 @@ public function testAddViewWithColumnRemapping(): void {
252252
$this->service->apply(1,
253253
$this->baseScheme(
254254
[$this->srcCol($srcColId, 'Score', 'number')],
255-
[['title' => 'Score View', 'filter' => [[['columnId' => $srcColId, 'operator' => 'is-not-empty', 'value' => '']]], 'sort' => [], 'columns' => [], 'columnSettings' => []]],
255+
[['title' => 'Score View', 'filter' => [[['columnId' => $srcColId, 'operator' => 'is-empty', 'value' => '']]], 'sort' => [], 'columns' => [], 'columnSettings' => []]],
256256
),
257257
[
258258
'columnsAdd' => [$srcColId],
@@ -275,7 +275,7 @@ public function testViewFilterReferencesUnknownSourceColumnThrows(): void {
275275
$this->service->apply(1,
276276
$this->baseScheme(
277277
[],
278-
[['title' => 'V', 'filter' => [[['columnId' => 999, 'operator' => 'is-not-empty', 'value' => '']]], 'sort' => [], 'columns' => [], 'columnSettings' => []]],
278+
[['title' => 'V', 'filter' => [[['columnId' => 999, 'operator' => 'is-empty', 'value' => '']]], 'sort' => [], 'columns' => [], 'columnSettings' => []]],
279279
),
280280
['viewsAdd' => ['V']]
281281
);

0 commit comments

Comments
 (0)