Younes ENNAJI
47eb66e874
fix: update tests for new validation requirements
...
Update tests that were using invalid values for HopsStamp (0 is now
invalid, must be >= 1) and update expected output format for
mainScript (now uses json_encode which produces double quotes).
2026-03-01 20:13:57 +00:00
Younes ENNAJI
6d314dbc07
fix: add validation to HopsStamp and DelayStamp
...
HopsStamp:
- Validate hops amount must be >= 1 (positive integer)
- Negative or zero hops don't make logical sense
DelayStamp:
- Validate delay must be >= 0 (non-negative integer)
- Negative delays don't make logical sense
Both now throw InvalidArgumentException for invalid values, making
configuration errors fail fast with clear messages.
2026-03-01 20:07:54 +00:00
Younes ENNAJI
ad5c0f56dd
fix: validate limit criteria must be positive integer
...
Previously, negative limits caused array_slice() to return unexpected
results (all except last N elements) and zero returned an empty array
without clear intent.
Now throws InvalidArgumentException for values < 1, making invalid
configurations fail fast with a clear error message.
2026-03-01 20:06:53 +00:00
Younes ENNAJI
1d81de581b
fix: escape nonce and mainScript to prevent XSS vulnerabilities
...
The HtmlPresenter was interpolating user-controlled values directly into
HTML attributes and JavaScript code without proper escaping, creating
XSS vulnerabilities.
Changes:
- Escape nonce with htmlspecialchars() for HTML attribute context
- Escape nonce with json_encode() for JavaScript string context
- Escape mainScript with json_encode() for JavaScript string context
Added tests to verify XSS payloads are properly escaped.
2026-03-01 19:55:49 +00:00
Younes ENNAJI
ed992d78f6
add tests for FlasherAssert and Constraint classes
2026-02-25 20:45:32 +00:00
Younes ENNAJI
c9a61ba69c
add tests for helper functions
2026-02-25 20:29:51 +00:00
Younes ENNAJI
18c2233baa
add tests for remaining Criteria classes
2026-02-25 20:01:29 +00:00
Younes ENNAJI
cd53ceb139
improve test coverage for edge cases
2026-02-25 19:31:21 +00:00
Younes ENNAJI
549c36eeee
improve test coverage for PHPUnit and Vitest
2026-02-25 19:16:53 +00:00
Younes ENNAJI
670e40dc97
fix StampsCriteria comparing values instead of keys
2026-02-25 10:43:44 +00:00
Younes ENNAJI
2b0e736d28
fix multi-field sorting in OrderByCriteria
2026-02-25 10:43:36 +00:00
Younes ENNAJI
d65300a0e9
Fix PHPStan errors and test failures, improve PHPDoc documentation ordering
2026-01-10 04:36:16 +01:00
Younes ENNAJI
93ca18a67b
add themes to symfony configuration
2025-03-27 21:23:53 +00:00
Younes ENNAJI
d59e37812d
chore: run php-cs-fixer
2024-09-19 06:42:10 +01:00
Younes ENNAJI
b28525d718
chore: add and run phpstan phpunit
2024-05-27 00:34:47 +01:00
Younes ENNAJI
39f1f3885e
chore: fix phpstan bleeding edge errors
2024-05-13 10:24:42 +01:00
Younes ENNAJI
d2f019fb62
chore: update the doc and improve phpstan annotations
2024-05-05 19:44:39 +01:00
Younes ENNAJI
1f4ea40a39
chore: v2 full rewrite
2024-04-09 07:57:01 +00:00
Younes ENNAJI
117b4815c7
chore: use php v5.3 syntax
2023-12-16 18:11:36 +01:00
Younes ENNAJI
c2a013d1e9
chore: fix unit tests
2023-12-16 18:07:27 +01:00
Younes ENNAJI
39201b888f
chore: bump flasher assets to v1.3.2
2023-12-16 17:58:59 +01:00
Khoubza Younes
eb0244ae37
fix: loading flasher styles correctly
2023-06-06 11:26:33 +01:00
Khoubza Younes
4d62fa3548
feat: set flasher scripts and styles on top level config
2023-06-06 01:36:57 +01:00
Khoubza Younes
8ca1c6fd8e
test: add criteria builder tests
2023-02-05 18:52:19 +01:00
Khoubza Younes
590d39b37f
test: fix response envelopes order
2023-02-05 17:41:22 +01:00
Khoubza Younes
781e045155
test: add resource manager tests
2023-02-05 17:22:42 +01:00
Khoubza Younes
2faedb15c9
test: add response manager tests
2023-02-05 17:22:24 +01:00
Khoubza Younes
e084ac1102
test: add response class tests
2023-02-05 17:22:00 +01:00
Khoubza Younes
fab8a9ecb6
test: test html renderer it retruen only envelopes as json object
2023-02-05 12:41:59 +01:00
Khoubza Younes
ffb839e8e1
test: add html presenter tests
2023-02-01 23:51:31 +01:00
Khoubza Younes
10d647199b
test: add array presenter tests
2023-02-01 23:51:31 +01:00
Khoubza Younes
0579964afc
style: update notification factory base phpunit class
2023-02-01 23:03:47 +01:00
Khoubza Younes
9f426f0b8c
test: add storage manager tests
2023-02-01 23:03:12 +01:00
Khoubza Younes
ccbeb568c4
test: add Language helper tests
2023-02-01 23:03:00 +01:00
Khoubza Younes
afd5fc33e4
test: add echo translator tests
2023-02-01 23:02:43 +01:00
Khoubza Younes
a7420e15aa
test: add storage bag tests
2023-02-01 00:20:22 +01:00
Khoubza Younes
9b8e3ffa01
test: add StaticBag tests
2023-02-01 00:20:22 +01:00
Khoubza Younes
6c2baa8d01
test: add ArrayBag tests
2023-02-01 00:20:22 +01:00
Khoubza Younes
17112a0bd0
test: add more envelope tests
2023-01-31 23:07:21 +01:00
Khoubza Younes
238eb063a4
test: add testDynamicCallToNotificationBuilder test
2023-01-31 22:46:21 +01:00
Khoubza Younes
7097a59cad
test: add TranslationListener tests
2023-01-31 22:41:39 +01:00
Khoubza Younes
426bc17001
test: add StampsListener tests
2023-01-31 22:21:20 +01:00
Khoubza Younes
1007c8536c
test: add RemoveListener tests
2023-01-31 22:16:47 +01:00
Khoubza Younes
5f51aef458
test: add PresetListener tests
2023-01-31 22:16:33 +01:00
Khoubza Younes
4fcf78fbda
test: add AddToStorageListener tests
2023-01-31 22:16:14 +01:00
Khoubza Younes
5bb9ac2fc7
test: add events tests
2023-01-31 01:48:30 +01:00
Khoubza Younes
02733b0d92
test: add stamps tests
2023-01-31 01:02:50 +01:00
Khoubza Younes
6b2066854f
test: add notification tests
2023-01-31 00:24:10 +01:00
Khoubza Younes
d13e299022
test: add more envelope tests
2023-01-30 23:52:40 +01:00
Khoubza Younes
a83aec01fe
test: add notification builder tests
2023-01-30 01:29:35 +01:00