Skip to content

Commit

Permalink
Disable extraAttributes from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaracmp committed Feb 13, 2020
1 parent a5f3e28 commit 2b648de
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/Cmp/Queues/Domain/Event/JSONDomainEventFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public function create($json)
$domainEventArray['body'],
isset($domainEventArray['id']) ? $domainEventArray['id'] : null,
isset($domainEventArray['isDeprecated']) ? $domainEventArray['isDeprecated'] : false,
isset($domainEventArray['correlationId']) ? $domainEventArray['correlationId'] : null,
isset($domainEventArray['extraAttributes']) ? $domainEventArray['extraAttributes'] : null
isset($domainEventArray['correlationId']) ? $domainEventArray['correlationId'] : null
// isset($domainEventArray['extraAttributes']) ? $domainEventArray['extraAttributes'] : null
);
} catch (DomainEventException $e) {
throw new InvalidJSONDomainEventException("Failed creating DomainEvent instance", 0, $e);
Expand Down
10 changes: 5 additions & 5 deletions tests/behat/features/bootstrap/Context/DomainContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ public function iSendARandomDomainEvent()
array(1,2,3,4,5),
null,
false,
null,
['attribute1', 'attribute2']
null
// ['attribute1', 'attribute2']
);
$publisher = $this->getDomainEventPublisher();
$publisher->add($this->domainEvent);
Expand All @@ -138,7 +138,7 @@ public function iShouldConsumeTheRandomDomainEvent()
assert($this->domainEvent->getBody() === $incomingDomainEvent->getBody(), 'Body doesnt match');
assert($this->domainEvent->getVersion() === $incomingDomainEvent->getVersion(), 'Version doesnt match');
assert($this->domainEvent->getOccurredOn() === $incomingDomainEvent->getOccurredOn(), 'OccurredOn doesnt match');
assert($this->domainEvent->getExtraAttributes() === $incomingDomainEvent->getExtraAttributes(), 'ExtraAttributes doesnt match');
// assert($this->domainEvent->getExtraAttributes() === $incomingDomainEvent->getExtraAttributes(), 'ExtraAttributes doesnt match');
}

/**
Expand All @@ -155,8 +155,8 @@ public function iSendARandomDomainEventWithAnUnwantedTopic()
array(1,2,3,4,5),
null,
false,
null,
['attribute1', 'attribute2']
null
// ['attribute1', 'attribute2']
);
$publisher = $this->getDomainEventPublisher();
$publisher->add($this->domainEvent);
Expand Down
8 changes: 4 additions & 4 deletions tests/spec/Cmp/Queues/Domain/Event/DomainEventSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ function let()
array("foo" => "bar", "empty" => null),
'uuid',
true,
'correlation',
['attribute1', 'attribute2']
'correlation'
// ['attribute1', 'attribute2']
);
}

Expand Down Expand Up @@ -112,10 +112,10 @@ function it_should_have_the_correlation_id()
$this->getCorrelationId()->shouldBe("correlation");
}

function it_should_have_the_extra_attributes()
/* function it_should_have_the_extra_attributes()
{
$this->getExtraAttributes()->shouldBe(['attribute1', 'attribute2']);
}
}*/

function it_can_get_body_values()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function it_can_detect_a_optional_fields()
$id = "abc";
$isDeprecated = true;
$correlationId = "def";
$extraAttributes = ['attribute1', 'attribute2'];
// $extraAttributes = ['attribute1', 'attribute2'];

$taskPreFactory = new DomainEvent(
'origin',
Expand All @@ -52,8 +52,8 @@ function it_can_detect_a_optional_fields()
array(1,2,3,4,5),
$id,
$isDeprecated,
$correlationId,
$extraAttributes
$correlationId
// $extraAttributes
);
$this->create(json_encode($taskPreFactory))->shouldBeLike($taskPreFactory);
}
Expand Down

0 comments on commit 2b648de

Please sign in to comment.