Skip to content

Commit

Permalink
Merge pull request #194 from 5pm-HDH/fix/184/db-fields-groupinformation
Browse files Browse the repository at this point in the history
Fix/184/db fields groupinformation
  • Loading branch information
DumbergerL authored Jan 9, 2024
2 parents 0363586 + 922f221 commit 32f1137
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
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

0 comments on commit 32f1137

Please sign in to comment.