[PR #3757] [MERGED] Testing cleanup #6259

Closed
opened 2026-02-05 10:27:55 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/3757
Author: @ssddanbrown
Created: 9/29/2022
Status: Merged
Merged: 9/30/2022
Merged by: @ssddanbrown

Base: developmentHead: tests_entity_cleanup


📝 Commits (3)

  • 068a8a0 Extracted entity testcase methods to own class
  • b56f735 Migrated much test entity usage via find/replace
  • 900e853 Quick run through of applying new test entity helper class

📊 Changes

56 files changed (+758 additions, -869 deletions)

View changed files

📝 app/Api/ListingResponseBuilder.php (+0 -1)
📝 tests/Actions/AuditLogTest.php (+12 -19)
📝 tests/Actions/WebhookCallTest.php (+1 -3)
📝 tests/Actions/WebhookFormatTesting.php (+4 -8)
📝 tests/Api/AttachmentsApiTest.php (+17 -31)
📝 tests/Api/BooksApiTest.php (+10 -11)
📝 tests/Api/ChaptersApiTest.php (+9 -10)
📝 tests/Api/PagesApiTest.php (+19 -20)
📝 tests/Api/RecycleBinApiTest.php (+5 -6)
📝 tests/Api/SearchApiTest.php (+2 -4)
📝 tests/Api/UsersApiTest.php (+1 -1)
📝 tests/Auth/AuthTest.php (+1 -3)
📝 tests/Commands/ClearActivityCommandTest.php (+1 -3)
📝 tests/Commands/CopyShelfPermissionsCommandTest.php (+4 -4)
📝 tests/Commands/RegenerateReferencesCommandTest.php (+1 -3)
📝 tests/Commands/UpdateUrlCommandTest.php (+1 -2)
📝 tests/Entity/BookShelfTest.php (+14 -15)
📝 tests/Entity/BookTest.php (+13 -20)
📝 tests/Entity/ChapterTest.php (+7 -13)
📝 tests/Entity/CommentSettingTest.php (+4 -11)

...and 36 more files

📄 Description

Clean-up of entity-specific handling within testcases to cut down on very common boilerplate work and
organise some of the TestCase messiness and manual phpdoc types.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/3757 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 9/29/2022 **Status:** ✅ Merged **Merged:** 9/30/2022 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `tests_entity_cleanup` --- ### 📝 Commits (3) - [`068a8a0`](https://github.com/BookStackApp/BookStack/commit/068a8a068c5d7c7ab98a6ee95baae8d321c3c61f) Extracted entity testcase methods to own class - [`b56f735`](https://github.com/BookStackApp/BookStack/commit/b56f7355aa3a44c8529073fc2a3e760d0404f2ad) Migrated much test entity usage via find/replace - [`900e853`](https://github.com/BookStackApp/BookStack/commit/900e853b1568cf24dea52b09aa0fa6582e670645) Quick run through of applying new test entity helper class ### 📊 Changes **56 files changed** (+758 additions, -869 deletions) <details> <summary>View changed files</summary> 📝 `app/Api/ListingResponseBuilder.php` (+0 -1) 📝 `tests/Actions/AuditLogTest.php` (+12 -19) 📝 `tests/Actions/WebhookCallTest.php` (+1 -3) 📝 `tests/Actions/WebhookFormatTesting.php` (+4 -8) 📝 `tests/Api/AttachmentsApiTest.php` (+17 -31) 📝 `tests/Api/BooksApiTest.php` (+10 -11) 📝 `tests/Api/ChaptersApiTest.php` (+9 -10) 📝 `tests/Api/PagesApiTest.php` (+19 -20) 📝 `tests/Api/RecycleBinApiTest.php` (+5 -6) 📝 `tests/Api/SearchApiTest.php` (+2 -4) 📝 `tests/Api/UsersApiTest.php` (+1 -1) 📝 `tests/Auth/AuthTest.php` (+1 -3) 📝 `tests/Commands/ClearActivityCommandTest.php` (+1 -3) 📝 `tests/Commands/CopyShelfPermissionsCommandTest.php` (+4 -4) 📝 `tests/Commands/RegenerateReferencesCommandTest.php` (+1 -3) 📝 `tests/Commands/UpdateUrlCommandTest.php` (+1 -2) 📝 `tests/Entity/BookShelfTest.php` (+14 -15) 📝 `tests/Entity/BookTest.php` (+13 -20) 📝 `tests/Entity/ChapterTest.php` (+7 -13) 📝 `tests/Entity/CommentSettingTest.php` (+4 -11) _...and 36 more files_ </details> ### 📄 Description Clean-up of entity-specific handling within testcases to cut down on very common boilerplate work and organise some of the TestCase messiness and manual phpdoc types. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:27:55 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6259