thirdparty: fix denormalization of thirdparty

This commit is contained in:
2021-12-14 15:46:55 +01:00
parent d3127bed6d
commit da7bfa8a4e
4 changed files with 71 additions and 30 deletions

View File

@@ -35,8 +35,8 @@ final class ThirdPartyTest extends TestCase
$this->assertTrue($tp->getCategories()->contains($cat2));
$this->assertCount(2, $tp->getCategories());
$this->assertCount(1, $tp->getTypes());
$this->assertContains('type', $tp->getTypes());
$this->assertCount(1, $tp->getThirdPartyTypes());
$this->assertContains('type', $tp->getThirdPartyTypes());
$this->assertCount(3, $tp->getTypesAndCategories());
$this->assertContains($cat1, $tp->getTypesAndCategories());
@@ -54,8 +54,8 @@ final class ThirdPartyTest extends TestCase
$this->assertFalse($tp->getCategories()->contains($cat2));
$this->assertCount(1, $tp->getCategories());
$this->assertCount(0, $tp->getTypes());
$this->assertNotContains('type', $tp->getTypes());
$this->assertCount(0, $tp->getThirdPartyTypes());
$this->assertNotContains('type', $tp->getThirdPartyTypes());
$this->assertCount(1, $tp->getTypesAndCategories());
$this->assertContains($cat1, $tp->getTypesAndCategories());
@@ -77,9 +77,9 @@ final class ThirdPartyTest extends TestCase
$this->assertTrue($tp->getCategories()->contains($cat2));
$this->assertCount(2, $tp->getCategories());
$this->assertCount(2, $tp->getTypes());
$this->assertContains('type1', $tp->getTypes());
$this->assertContains('type2', $tp->getTypes());
$this->assertCount(2, $tp->getThirdPartyTypes());
$this->assertContains('type1', $tp->getThirdPartyTypes());
$this->assertContains('type2', $tp->getThirdPartyTypes());
$this->assertCount(4, $tp->getTypesAndCategories());
$this->assertContains($cat1, $tp->getTypesAndCategories());
@@ -93,9 +93,9 @@ final class ThirdPartyTest extends TestCase
$this->assertFalse($tp->getCategories()->contains($cat2));
$this->assertCount(1, $tp->getCategories());
$this->assertCount(1, $tp->getTypes());
$this->assertContains('type1', $tp->getTypes());
$this->assertNotContains('type2', $tp->getTypes());
$this->assertCount(1, $tp->getThirdPartyTypes());
$this->assertContains('type1', $tp->getThirdPartyTypes());
$this->assertNotContains('type2', $tp->getThirdPartyTypes());
$this->assertCount(2, $tp->getTypesAndCategories());
$this->assertContains($cat1, $tp->getTypesAndCategories());