From 1e7c60bdfaece5104e2d26722103ff95285c38ce Mon Sep 17 00:00:00 2001 From: Jasper Zonneveld Date: Thu, 8 Sep 2022 09:14:43 +0200 Subject: [PATCH] Renamed test mock MasterItem to ParentItem --- tests/Concerns/HasRelationsTest.php | 10 ++-- tests/ItemHydratorTest.php | 6 +-- tests/ItemTest.php | 24 +++++----- tests/Parsers/DocumentParserTest.php | 46 +++++++++--------- tests/Parsers/ItemParserTest.php | 48 +++++++++---------- .../Items/{MasterItem.php => ParentItem.php} | 4 +- 6 files changed, 69 insertions(+), 69 deletions(-) rename tests/_mocks/Items/{MasterItem.php => ParentItem.php} (94%) diff --git a/tests/Concerns/HasRelationsTest.php b/tests/Concerns/HasRelationsTest.php index 9e8fd9a..ac8aa8f 100644 --- a/tests/Concerns/HasRelationsTest.php +++ b/tests/Concerns/HasRelationsTest.php @@ -14,7 +14,7 @@ use Swis\JsonApi\Client\Relations\HasOneRelation; use Swis\JsonApi\Client\Relations\MorphToManyRelation; use Swis\JsonApi\Client\Relations\MorphToRelation; -use Swis\JsonApi\Client\Tests\Mocks\Items\MasterItem; +use Swis\JsonApi\Client\Tests\Mocks\Items\ParentItem; use Swis\JsonApi\Client\Util; class HasRelationsTest extends TestCase @@ -197,7 +197,7 @@ public function itCanDefineAHasOneRelation() /** @var \PHPUnit\Framework\MockObject\MockObject&\Swis\JsonApi\Client\Concerns\HasRelations $mock */ $mock = $this->getMockForTrait(HasRelations::class); - $relation = $mock->hasOne(MasterItem::class, 'foo-bar'); + $relation = $mock->hasOne(ParentItem::class, 'foo-bar'); $this->assertInstanceOf(HasOneRelation::class, $relation); $this->assertSame($relation, $mock->getRelation('foo-bar')); @@ -211,7 +211,7 @@ public function itCanDefineAHasOneRelationWithTheCallingMethodAsFallbackName() /** @var \PHPUnit\Framework\MockObject\MockObject&\Swis\JsonApi\Client\Concerns\HasRelations $mock */ $mock = $this->getMockForTrait(HasRelations::class); - $relation = $mock->hasOne(MasterItem::class); + $relation = $mock->hasOne(ParentItem::class); $this->assertInstanceOf(HasOneRelation::class, $relation); $this->assertSame($relation, $mock->getRelation(Util::stringSnake(__FUNCTION__))); @@ -225,7 +225,7 @@ public function itCanDefineAHasManyRelation() /** @var \PHPUnit\Framework\MockObject\MockObject&\Swis\JsonApi\Client\Concerns\HasRelations $mock */ $mock = $this->getMockForTrait(HasRelations::class); - $relation = $mock->hasMany(MasterItem::class, 'foo-bar'); + $relation = $mock->hasMany(ParentItem::class, 'foo-bar'); $this->assertInstanceOf(HasManyRelation::class, $relation); $this->assertSame($relation, $mock->getRelation('foo-bar')); @@ -239,7 +239,7 @@ public function itCanDefineAHasManyRelationWithTheCallingMethodAsFallbackName() /** @var \PHPUnit\Framework\MockObject\MockObject&\Swis\JsonApi\Client\Concerns\HasRelations $mock */ $mock = $this->getMockForTrait(HasRelations::class); - $relation = $mock->hasMany(MasterItem::class); + $relation = $mock->hasMany(ParentItem::class); $this->assertInstanceOf(HasManyRelation::class, $relation); $this->assertSame($relation, $mock->getRelation(Util::stringSnake(__FUNCTION__))); diff --git a/tests/ItemHydratorTest.php b/tests/ItemHydratorTest.php index f708d00..a390507 100644 --- a/tests/ItemHydratorTest.php +++ b/tests/ItemHydratorTest.php @@ -14,7 +14,7 @@ use Swis\JsonApi\Client\Relations\MorphToManyRelation; use Swis\JsonApi\Client\Relations\MorphToRelation; use Swis\JsonApi\Client\Tests\Mocks\Items\AnotherRelatedItem; -use Swis\JsonApi\Client\Tests\Mocks\Items\MasterItem; +use Swis\JsonApi\Client\Tests\Mocks\Items\ParentItem; use Swis\JsonApi\Client\Tests\Mocks\Items\RelatedItem; use Swis\JsonApi\Client\Tests\Mocks\Items\WithRelationshipItem; use Swis\JsonApi\Client\TypeMapper; @@ -589,10 +589,10 @@ public function itThrowsWhenRelationshipIsPresentInAvailableRelationshipsButTheM 'does_not_exist' => '1', ]; - $item = new MasterItem(); + $item = new ParentItem(); $this->expectException(HydrationException::class); - $this->expectExceptionMessage(sprintf('Method doesNotExist not found on %s', MasterItem::class)); + $this->expectExceptionMessage(sprintf('Method doesNotExist not found on %s', ParentItem::class)); $this->getItemHydrator()->hydrate($item, $data); } diff --git a/tests/ItemTest.php b/tests/ItemTest.php index 64a80a0..ec4a580 100644 --- a/tests/ItemTest.php +++ b/tests/ItemTest.php @@ -13,7 +13,7 @@ use Swis\JsonApi\Client\Links; use Swis\JsonApi\Client\Meta; use Swis\JsonApi\Client\Tests\Mocks\Items\ChildItem; -use Swis\JsonApi\Client\Tests\Mocks\Items\MasterItem; +use Swis\JsonApi\Client\Tests\Mocks\Items\ParentItem; use Swis\JsonApi\Client\Tests\Mocks\Items\RelatedItem; use Swis\JsonApi\Client\Tests\Mocks\Items\WithHiddenItem; use Swis\JsonApi\Client\Tests\Mocks\Items\WithRelationshipItem; @@ -491,11 +491,11 @@ public function itIsNewWhenNoIdIsset() */ public function itCanGetARelationValueUsingGetAttributeMethod() { - $masterItem = new MasterItem(); + $parentItem = new ParentItem(); $childItem = new ChildItem(); - $masterItem->child()->associate($childItem); + $parentItem->child()->associate($childItem); - $this->assertSame($childItem, $masterItem->getAttribute('child')); + $this->assertSame($childItem, $parentItem->getAttribute('child')); } /** @@ -528,14 +528,14 @@ public function itReturnsABooleanIndicatingIfItHasAttributes() */ public function itCanGetAllRelationships() { - $masterItem = new MasterItem(); + $parentItem = new ParentItem(); $childItem = new ChildItem(); $childItem->setId('1'); $childItem->setMeta(new Meta(['foo' => 'bar'])); - $masterItem->child()->associate($childItem); - $masterItem->children()->associate(new Collection([$childItem])); + $parentItem->child()->associate($childItem); + $parentItem->children()->associate(new Collection([$childItem])); - $relations = $masterItem->getRelationships(); + $relations = $parentItem->getRelationships(); $this->assertSame([ 'child' => [ @@ -566,13 +566,13 @@ public function itCanGetAllRelationships() */ public function itReturnsABooleanIndicatingIfItHasRelationships() { - $masterItem = new MasterItem(); - $this->assertFalse($masterItem->hasRelationships()); + $parentItem = new ParentItem(); + $this->assertFalse($parentItem->hasRelationships()); $childItem = (new ChildItem())->setId('1'); - $masterItem->child()->associate($childItem); + $parentItem->child()->associate($childItem); - $this->assertTrue($masterItem->hasRelationships()); + $this->assertTrue($parentItem->hasRelationships()); } /** diff --git a/tests/Parsers/DocumentParserTest.php b/tests/Parsers/DocumentParserTest.php index 8056250..5160e5e 100644 --- a/tests/Parsers/DocumentParserTest.php +++ b/tests/Parsers/DocumentParserTest.php @@ -19,7 +19,7 @@ use Swis\JsonApi\Client\Meta; use Swis\JsonApi\Client\Parsers\DocumentParser; use Swis\JsonApi\Client\Tests\Mocks\Items\ChildItem; -use Swis\JsonApi\Client\Tests\Mocks\Items\MasterItem; +use Swis\JsonApi\Client\Tests\Mocks\Items\ParentItem; use Swis\JsonApi\Client\TypeMapper; class DocumentParserTest extends TestCase @@ -201,7 +201,7 @@ public function itThrowsWhenItFindsDuplicateResources() [ 'data' => [ [ - 'type' => 'master', + 'type' => 'parent', 'id' => '1', 'attributes' => [ 'foo' => 'bar', @@ -210,7 +210,7 @@ public function itThrowsWhenItFindsDuplicateResources() ], 'included' => [ [ - 'type' => 'master', + 'type' => 'parent', 'id' => '1', 'attributes' => [ 'foo' => 'bar', @@ -232,7 +232,7 @@ public function itParsesAResourceDocument() json_encode( [ 'data' => [ - 'type' => 'master', + 'type' => 'parent', 'id' => '1', 'attributes' => [ 'foo' => 'bar', @@ -244,7 +244,7 @@ public function itParsesAResourceDocument() $this->assertInstanceOf(ItemDocument::class, $document); $this->assertInstanceOf(ItemInterface::class, $document->getData()); - $this->assertEquals('master', $document->getData()->getType()); + $this->assertEquals('parent', $document->getData()->getType()); $this->assertEquals('1', $document->getData()->getId()); } @@ -259,7 +259,7 @@ public function itParsesAResourceCollectionDocument() [ 'data' => [ [ - 'type' => 'master', + 'type' => 'parent', 'id' => '1', 'attributes' => [ 'foo' => 'bar', @@ -273,7 +273,7 @@ public function itParsesAResourceCollectionDocument() $this->assertInstanceOf(CollectionDocument::class, $document); $this->assertInstanceOf(Collection::class, $document->getData()); $this->assertCount(1, $document->getData()); - $this->assertEquals('master', $document->getData()->get(0)->getType()); + $this->assertEquals('parent', $document->getData()->get(0)->getType()); $this->assertEquals('1', $document->getData()->get(0)->getId()); } @@ -308,7 +308,7 @@ public function itParsesIncluded() 'data' => [], 'included' => [ [ - 'type' => 'master', + 'type' => 'parent', 'id' => '1', 'attributes' => [ 'foo' => 'bar', @@ -322,7 +322,7 @@ public function itParsesIncluded() $this->assertInstanceOf(CollectionDocument::class, $document); $this->assertInstanceOf(Collection::class, $document->getIncluded()); $this->assertCount(1, $document->getIncluded()); - $this->assertEquals('master', $document->getIncluded()->get(0)->getType()); + $this->assertEquals('parent', $document->getIncluded()->get(0)->getType()); $this->assertEquals('1', $document->getIncluded()->get(0)->getId()); } @@ -332,7 +332,7 @@ public function itParsesIncluded() public function itLinksSingularRelationsToItemsFromIncluded() { $typeMapper = new TypeMapper(); - $typeMapper->setMapping('master', MasterItem::class); + $typeMapper->setMapping('parent', ParentItem::class); $typeMapper->setMapping('child', ChildItem::class); $parser = DocumentParser::create($typeMapper); @@ -340,7 +340,7 @@ public function itLinksSingularRelationsToItemsFromIncluded() json_encode( [ 'data' => [ - 'type' => 'master', + 'type' => 'parent', 'id' => '1', 'attributes' => [ 'foo' => 'bar', @@ -367,7 +367,7 @@ public function itLinksSingularRelationsToItemsFromIncluded() ) ); - $this->assertInstanceOf(MasterItem::class, $document->getData()); + $this->assertInstanceOf(ParentItem::class, $document->getData()); $this->assertInstanceOf(ChildItem::class, $document->getData()->child()->getIncluded()); $this->assertSame($document->getIncluded()->get(0), $document->getData()->child()->getIncluded()); } @@ -378,7 +378,7 @@ public function itLinksSingularRelationsToItemsFromIncluded() public function itDoesNotLinkEmptySingularRelations() { $typeMapper = new TypeMapper(); - $typeMapper->setMapping('master', MasterItem::class); + $typeMapper->setMapping('parent', ParentItem::class); $typeMapper->setMapping('child', ChildItem::class); $parser = DocumentParser::create($typeMapper); @@ -386,7 +386,7 @@ public function itDoesNotLinkEmptySingularRelations() json_encode( [ 'data' => [ - 'type' => 'master', + 'type' => 'parent', 'id' => '1', 'attributes' => [ 'foo' => 'bar', @@ -410,7 +410,7 @@ public function itDoesNotLinkEmptySingularRelations() ) ); - $this->assertInstanceOf(MasterItem::class, $document->getData()); + $this->assertInstanceOf(ParentItem::class, $document->getData()); $this->assertNull($document->getData()->child()->getIncluded()); $this->assertInstanceOf(ChildItem::class, $document->getIncluded()->get(0)); } @@ -421,7 +421,7 @@ public function itDoesNotLinkEmptySingularRelations() public function itLinksPluralRelationsToItemsFromIncluded() { $typeMapper = new TypeMapper(); - $typeMapper->setMapping('master', MasterItem::class); + $typeMapper->setMapping('parent', ParentItem::class); $typeMapper->setMapping('child', ChildItem::class); $parser = DocumentParser::create($typeMapper); @@ -429,7 +429,7 @@ public function itLinksPluralRelationsToItemsFromIncluded() json_encode( [ 'data' => [ - 'type' => 'master', + 'type' => 'parent', 'id' => '1', 'attributes' => [ 'foo' => 'bar', @@ -469,7 +469,7 @@ public function itLinksPluralRelationsToItemsFromIncluded() ) ); - $this->assertInstanceOf(MasterItem::class, $document->getData()); + $this->assertInstanceOf(ParentItem::class, $document->getData()); $this->assertInstanceOf(Collection::class, $document->getData()->children()->getIncluded()); $this->assertInstanceOf(ChildItem::class, $document->getData()->children()->getIncluded()->get(0)); $this->assertSame($document->getIncluded()->get(0), $document->getData()->children()->getIncluded()->get(0)); @@ -482,7 +482,7 @@ public function itLinksPluralRelationsToItemsFromIncluded() public function itDoesNotLinkEmptyPluralRelations() { $typeMapper = new TypeMapper(); - $typeMapper->setMapping('master', MasterItem::class); + $typeMapper->setMapping('parent', ParentItem::class); $typeMapper->setMapping('child', ChildItem::class); $parser = DocumentParser::create($typeMapper); @@ -490,7 +490,7 @@ public function itDoesNotLinkEmptyPluralRelations() json_encode( [ 'data' => [ - 'type' => 'master', + 'type' => 'parent', 'id' => '1', 'attributes' => [ 'foo' => 'bar', @@ -521,7 +521,7 @@ public function itDoesNotLinkEmptyPluralRelations() ) ); - $this->assertInstanceOf(MasterItem::class, $document->getData()); + $this->assertInstanceOf(ParentItem::class, $document->getData()); $this->assertInstanceOf(Collection::class, $document->getData()->children()->getIncluded()); $this->assertEmpty($document->getData()->children()->getIncluded()); $this->assertInstanceOf(ChildItem::class, $document->getIncluded()->get(0)); @@ -605,7 +605,7 @@ public function itParsesMeta() public function itParsesMetaInRelationshipDataAndIncluded() { $typeMapper = new TypeMapper(); - $typeMapper->setMapping('master', MasterItem::class); + $typeMapper->setMapping('parent', ParentItem::class); $typeMapper->setMapping('child', ChildItem::class); $parser = DocumentParser::create($typeMapper); @@ -613,7 +613,7 @@ public function itParsesMetaInRelationshipDataAndIncluded() json_encode( [ 'data' => [ - 'type' => 'master', + 'type' => 'parent', 'id' => '1', 'attributes' => [ 'foo' => 'bar', diff --git a/tests/Parsers/ItemParserTest.php b/tests/Parsers/ItemParserTest.php index 8ca4a4d..ecf8a24 100644 --- a/tests/Parsers/ItemParserTest.php +++ b/tests/Parsers/ItemParserTest.php @@ -20,7 +20,7 @@ use Swis\JsonApi\Client\Relations\MorphToManyRelation; use Swis\JsonApi\Client\Relations\MorphToRelation; use Swis\JsonApi\Client\Tests\Mocks\Items\ChildItem; -use Swis\JsonApi\Client\Tests\Mocks\Items\MasterItem; +use Swis\JsonApi\Client\Tests\Mocks\Items\ParentItem; use Swis\JsonApi\Client\Tests\Mocks\Items\PlainItem; use Swis\JsonApi\Client\Tests\Mocks\Items\WithoutRelationshipsItem; use Swis\JsonApi\Client\TypeMapper; @@ -33,11 +33,11 @@ class ItemParserTest extends TestCase public function itConvertsDataToItem() { $parser = $this->getItemParser(); - $item = $parser->parse($this->getJsonApiItemMock('master', '1')); + $item = $parser->parse($this->getJsonApiItemMock('parent', '1')); static::assertInstanceOf(ItemInterface::class, $item); - static::assertEquals('master', $item->getType()); + static::assertEquals('parent', $item->getType()); static::assertEquals('1', $item->getId()); $object = new \stdClass(); $object->foo = 'bar'; @@ -472,10 +472,10 @@ public function itParsesAHasOneRelationship() { $typeMapper = new TypeMapper(); $typeMapper->setMapping('child', ChildItem::class); - $typeMapper->setMapping('master', MasterItem::class); + $typeMapper->setMapping('parent', ParentItem::class); $parser = $this->getItemParser($typeMapper); - $item = $parser->parse($this->getJsonApiItemMock('master', '1')); + $item = $parser->parse($this->getJsonApiItemMock('parent', '1')); static::assertInstanceOf(HasOneRelation::class, $item->getRelation('child')); static::assertInstanceOf(Links::class, $item->getRelation('child')->getLinks()); @@ -493,10 +493,10 @@ public function itParsesAnEmptyHasOneRelationship() { $typeMapper = new TypeMapper(); $typeMapper->setMapping('child', ChildItem::class); - $typeMapper->setMapping('master', MasterItem::class); + $typeMapper->setMapping('parent', ParentItem::class); $parser = $this->getItemParser($typeMapper); - $item = $parser->parse($this->getJsonApiItemMock('master', '1')); + $item = $parser->parse($this->getJsonApiItemMock('parent', '1')); static::assertInstanceOf(HasOneRelation::class, $item->getRelation('empty')); static::assertNull($item->getRelation('empty')->getLinks()); @@ -512,10 +512,10 @@ public function itParsesAHasManyRelationship() { $typeMapper = new TypeMapper(); $typeMapper->setMapping('child', ChildItem::class); - $typeMapper->setMapping('master', MasterItem::class); + $typeMapper->setMapping('parent', ParentItem::class); $parser = $this->getItemParser($typeMapper); - $item = $parser->parse($this->getJsonApiItemMock('master', '1')); + $item = $parser->parse($this->getJsonApiItemMock('parent', '1')); static::assertInstanceOf(HasManyRelation::class, $item->getRelation('children')); static::assertInstanceOf(Links::class, $item->getRelation('children')->getLinks()); @@ -536,10 +536,10 @@ public function itParsesAMorphToRelation() { $typeMapper = new TypeMapper(); $typeMapper->setMapping('child', ChildItem::class); - $typeMapper->setMapping('master', MasterItem::class); + $typeMapper->setMapping('parent', ParentItem::class); $parser = $this->getItemParser($typeMapper); - $item = $parser->parse($this->getJsonApiItemMock('master', '1')); + $item = $parser->parse($this->getJsonApiItemMock('parent', '1')); static::assertInstanceOf(MorphToRelation::class, $item->getRelation('morph')); static::assertInstanceOf(Links::class, $item->getRelation('morph')->getLinks()); @@ -557,10 +557,10 @@ public function itParsesAMorphToManyRelation() { $typeMapper = new TypeMapper(); $typeMapper->setMapping('child', ChildItem::class); - $typeMapper->setMapping('master', MasterItem::class); + $typeMapper->setMapping('parent', ParentItem::class); $parser = $this->getItemParser($typeMapper); - $item = $parser->parse($this->getJsonApiItemMock('master', '1')); + $item = $parser->parse($this->getJsonApiItemMock('parent', '1')); static::assertInstanceOf(MorphToManyRelation::class, $item->getRelation('morphmany')); static::assertInstanceOf(Links::class, $item->getRelation('morphmany')->getLinks()); @@ -585,7 +585,7 @@ public function itParsesAnUnknownSingularRelationAsMorphTo() $typeMapper->setMapping('item-without-relationships', WithoutRelationshipsItem::class); $parser = $this->getItemParser($typeMapper); - $item = $parser->parse($this->getJsonApiItemMock('master', '1')); + $item = $parser->parse($this->getJsonApiItemMock('parent', '1')); static::assertInstanceOf(MorphToRelation::class, $item->getRelation('morph')); static::assertInstanceOf(Links::class, $item->getRelation('morph')->getLinks()); @@ -603,7 +603,7 @@ public function itParsesAnUnknownPluralRelationAsMorphToMany() $typeMapper->setMapping('item-without-relationships', WithoutRelationshipsItem::class); $parser = $this->getItemParser($typeMapper); - $item = $parser->parse($this->getJsonApiItemMock('master', '1')); + $item = $parser->parse($this->getJsonApiItemMock('parent', '1')); static::assertInstanceOf(MorphToManyRelation::class, $item->getRelation('morphmany')); static::assertInstanceOf(Links::class, $item->getRelation('morphmany')->getLinks()); @@ -620,7 +620,7 @@ public function itDoesNotSetDataWhenThereIsNoDataPresent() { $parser = $this->getItemParser(); - $item = $parser->parse($this->getJsonApiItemMock('master', '1')); + $item = $parser->parse($this->getJsonApiItemMock('parent', '1')); static::assertInstanceOf(MorphToRelation::class, $item->getRelation('nodata')); static::assertInstanceOf(Links::class, $item->getRelation('nodata')->getLinks()); @@ -635,11 +635,11 @@ public function itParsesLinks() { $parser = $this->getItemParser(); - $item = $parser->parse($this->getJsonApiItemMock('master', '1')); + $item = $parser->parse($this->getJsonApiItemMock('parent', '1')); static::assertInstanceOf(Links::class, $item->getLinks()); - static::assertEquals(new Links(['self' => new Link('http://example.com/master/1')]), $item->getLinks()); + static::assertEquals(new Links(['self' => new Link('http://example.com/parent/1')]), $item->getLinks()); } /** @@ -649,7 +649,7 @@ public function itParsesMeta() { $parser = $this->getItemParser(); - $item = $parser->parse($this->getJsonApiItemMock('master', '1')); + $item = $parser->parse($this->getJsonApiItemMock('parent', '1')); static::assertInstanceOf(Meta::class, $item->getMeta()); @@ -663,10 +663,10 @@ public function itParsesMetaInRelationship() { $typeMapper = new TypeMapper(); $typeMapper->setMapping('child', ChildItem::class); - $typeMapper->setMapping('master', MasterItem::class); + $typeMapper->setMapping('parent', ParentItem::class); $parser = $this->getItemParser($typeMapper); - $item = $parser->parse($this->getJsonApiItemMock('master', '1')); + $item = $parser->parse($this->getJsonApiItemMock('parent', '1')); $meta = $item->getRelation('child')->getMeta(); static::assertInstanceOf(Meta::class, $meta); @@ -681,10 +681,10 @@ public function itParsesMetaInRelationshipData() { $typeMapper = new TypeMapper(); $typeMapper->setMapping('child', ChildItem::class); - $typeMapper->setMapping('master', MasterItem::class); + $typeMapper->setMapping('parent', ParentItem::class); $parser = $this->getItemParser($typeMapper); - $item = $parser->parse($this->getJsonApiItemMock('master', '1')); + $item = $parser->parse($this->getJsonApiItemMock('parent', '1')); $dataMeta = $item->getRelation('childwithdatameta')->getIncluded()->getMeta(); static::assertInstanceOf(Meta::class, $dataMeta); @@ -851,7 +851,7 @@ private function getJsonApiItemMock($type, $id) ], ], 'links' => [ - 'self' => 'http://example.com/master/1', + 'self' => 'http://example.com/'.$type.'/'.$id, ], 'meta' => [ 'foo' => 'bar', diff --git a/tests/_mocks/Items/MasterItem.php b/tests/_mocks/Items/ParentItem.php similarity index 94% rename from tests/_mocks/Items/MasterItem.php rename to tests/_mocks/Items/ParentItem.php index fd4af4a..8a09b11 100644 --- a/tests/_mocks/Items/MasterItem.php +++ b/tests/_mocks/Items/ParentItem.php @@ -6,12 +6,12 @@ use Swis\JsonApi\Client\Item; -class MasterItem extends Item +class ParentItem extends Item { /** * @var string */ - protected $type = 'master'; + protected $type = 'parent'; /** * @var array