Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/184/db fields groupinformation #194

Merged
merged 3 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Fixed
- PHPUnit and PHP8.1 compatibility ([PR181](https://github.com/5pm-HDH/churchtools-api/pull/181))
- Fix GroupHierarchie ([PR192](https://github.com/5pm-HDH/churchtools-api/pull/192))
- Fix GroupHierarchie test, Fix DB-Fields test ([PR192](https://github.com/5pm-HDH/churchtools-api/pull/192), [PR194](https://github.com/5pm-HDH/churchtools-api/pull/194))

## [2.0.0]

Expand Down
10 changes: 4 additions & 6 deletions tests/Integration/Requests/DBFieldRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ class DBFieldRequestTest extends TestCaseAuthenticated
{
public static function setUpBeforeClass(): void
{
self::markTestSkipped("Fix issue with test in: https://github.com/5pm-HDH/churchtools-api/issues/184");
parent::setUpBeforeClass(); // @phpstan-ignore-line
parent::setUpBeforeClass();
}

public function testRequestAll()
Expand Down Expand Up @@ -117,19 +116,18 @@ private function assertDBFieldStoreOnlyContainsDBFields($dbFields)

public function testRetrieveGroupInformation()
{
$this->markTestSkipped("Fix issue with test in: https://github.com/5pm-HDH/churchtools-api/issues/184");
$groupId = IntegrationTestData::getFilterAsInt("db_field_group", "group_id"); // @phpstan-ignore-line
$groupId = IntegrationTestData::getFilterAsInt("db_field_group", "group_id");

$group = GroupRequest::findOrFail($groupId);
$groupInformation = $group->getInformation();
$this->assertNotNull($groupInformation);

print_r($groupInformation);
//print_r($groupInformation);

$dbFields = $groupInformation->requestDBFields()->get();
$this->assertDBFieldStoreOnlyContainsDBFields($dbFields);

print_r($dbFields);
//print_r($dbFields);

$name5pmDBField = null;
foreach ($dbFields as $dbField) {
Expand Down
10 changes: 5 additions & 5 deletions tests/Integration/integration-test-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,11 @@
"filter": {},
"result": {
"any_db_field": {
"id": 141,
"name": "5pm Bezeichnung",
"id": 145,
"name": "5PM Name",
"shorty": "5pm_name",
"column": "5pm_name",
"length": 220,
"length": 20,
"fieldCategory": {
"name": "group",
"internCode": "f_group",
Expand Down Expand Up @@ -530,8 +530,8 @@
},
"result": {
"db_field": {
"id": 141,
"name": "5pm Bezeichnung"
"id": 145,
"name": "5PM Name"
},
"value": "Worship-Team"
}
Expand Down
Loading