Added a form to /add which takes user input for the announcement and submits it to the database. The logged-in user is automatically pulled and the announcement is pushed with the username in the row for later features. The /add page will no longer automatically add persistent rows to the database, it must instead be entered manually.
The database name has also been changed from Article to Announcement, as per David's suggestion, and all files have been updated to work with the change. The user field has also been added to the database.
Unit-tests have also been rewritten to fit with both the database name change and the added user field.
Fixes
Please list any issues that are addressed by this change
Type of change
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
How Has This Been Tested?
I ran a unit-test - AnnouncementRepositoryTest.php - to check that the database can be written to and read from with the correct information. Visuals have also been tested for both visual and functionality personally.
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
Description
Added a form to /add which takes user input for the announcement and submits it to the database. The logged-in user is automatically pulled and the announcement is pushed with the username in the row for later features. The /add page will no longer automatically add persistent rows to the database, it must instead be entered manually.
The database name has also been changed from Article to Announcement, as per David's suggestion, and all files have been updated to work with the change. The user field has also been added to the database.
Unit-tests have also been rewritten to fit with both the database name change and the added user field.
Fixes
Please list any issues that are addressed by this change
Type of change
How Has This Been Tested?
I ran a unit-test - AnnouncementRepositoryTest.php - to check that the database can be written to and read from with the correct information. Visuals have also been tested for both visual and functionality personally.
Checklist: