Skip to content

Commit 24267cc

Browse files
committed
test: improve 'with options' test cases
refs: #269
1 parent a6b2b33 commit 24267cc

5 files changed

Lines changed: 8 additions & 36 deletions

File tree

tests/NotificationsMockTraitTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ public function testAssertNotificationsSentWithOptions(): void
7272
'via_method' => ['getValue()'],
7373
'via_property' => ['value'],
7474
'via_chain' => ['getDetails()', 'value'],
75-
'via_unresolvable' => ['nonExistentMethod()'],
75+
'via_unresolvable_method' => ['nonExistentMethod()'],
76+
'via_unresolvable_property' => ['nonExistentProp'],
77+
'via_unresolvable_chain' => ['getDetails()', 'nonExistentProp'],
7678
],
7779
);
7880
}

tests/fixtures/NotificationsMockTraitTest/assert_notifications_sent_multiple.json

Lines changed: 0 additions & 32 deletions
This file was deleted.

tests/fixtures/NotificationsMockTraitTest/assert_notifications_sent_with_options.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"via_method": "active",
2121
"via_property": "active",
2222
"via_chain": "active",
23-
"via_unresolvable": null
23+
"via_unresolvable_method": null,
24+
"via_unresolvable_property": null,
25+
"via_unresolvable_chain": null
2426
}
2527
]
2628
}

tests/support/Mock/Notifications/TestAnotherNotification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ public function getDetails(): object
3030
'value' => $this->value,
3131
];
3232
}
33-
}
33+
}

tests/support/Mock/Notifications/TestNotification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ public function getFirstParam(): string
2323
{
2424
return $this->firstParam;
2525
}
26-
}
26+
}

0 commit comments

Comments
 (0)