Skip to content

Commit 83a964e

Browse files
committed
Disable extraAttributes from tests
1 parent a5f3e28 commit 83a964e

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/Cmp/Queues/Domain/Event/JSONDomainEventFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function create($json)
3636
isset($domainEventArray['id']) ? $domainEventArray['id'] : null,
3737
isset($domainEventArray['isDeprecated']) ? $domainEventArray['isDeprecated'] : false,
3838
isset($domainEventArray['correlationId']) ? $domainEventArray['correlationId'] : null,
39-
isset($domainEventArray['extraAttributes']) ? $domainEventArray['extraAttributes'] : null
39+
// isset($domainEventArray['extraAttributes']) ? $domainEventArray['extraAttributes'] : null
4040
);
4141
} catch (DomainEventException $e) {
4242
throw new InvalidJSONDomainEventException("Failed creating DomainEvent instance", 0, $e);

tests/behat/features/bootstrap/Context/DomainContext.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ public function iSendARandomDomainEvent()
117117
array(1,2,3,4,5),
118118
null,
119119
false,
120-
null,
121-
['attribute1', 'attribute2']
120+
null
121+
// ['attribute1', 'attribute2']
122122
);
123123
$publisher = $this->getDomainEventPublisher();
124124
$publisher->add($this->domainEvent);
@@ -138,7 +138,7 @@ public function iShouldConsumeTheRandomDomainEvent()
138138
assert($this->domainEvent->getBody() === $incomingDomainEvent->getBody(), 'Body doesnt match');
139139
assert($this->domainEvent->getVersion() === $incomingDomainEvent->getVersion(), 'Version doesnt match');
140140
assert($this->domainEvent->getOccurredOn() === $incomingDomainEvent->getOccurredOn(), 'OccurredOn doesnt match');
141-
assert($this->domainEvent->getExtraAttributes() === $incomingDomainEvent->getExtraAttributes(), 'ExtraAttributes doesnt match');
141+
// assert($this->domainEvent->getExtraAttributes() === $incomingDomainEvent->getExtraAttributes(), 'ExtraAttributes doesnt match');
142142
}
143143

144144
/**
@@ -155,8 +155,8 @@ public function iSendARandomDomainEventWithAnUnwantedTopic()
155155
array(1,2,3,4,5),
156156
null,
157157
false,
158-
null,
159-
['attribute1', 'attribute2']
158+
null
159+
// ['attribute1', 'attribute2']
160160
);
161161
$publisher = $this->getDomainEventPublisher();
162162
$publisher->add($this->domainEvent);

tests/spec/Cmp/Queues/Domain/Event/DomainEventSpec.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ function let()
2121
array("foo" => "bar", "empty" => null),
2222
'uuid',
2323
true,
24-
'correlation',
25-
['attribute1', 'attribute2']
24+
'correlation'
25+
// ['attribute1', 'attribute2']
2626
);
2727
}
2828

@@ -112,10 +112,10 @@ function it_should_have_the_correlation_id()
112112
$this->getCorrelationId()->shouldBe("correlation");
113113
}
114114

115-
function it_should_have_the_extra_attributes()
115+
/* function it_should_have_the_extra_attributes()
116116
{
117117
$this->getExtraAttributes()->shouldBe(['attribute1', 'attribute2']);
118-
}
118+
}*/
119119

120120
function it_can_get_body_values()
121121
{

tests/spec/Cmp/Queues/Domain/Event/JSONDomainEventFactorySpec.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function it_can_detect_a_optional_fields()
4242
$id = "abc";
4343
$isDeprecated = true;
4444
$correlationId = "def";
45-
$extraAttributes = ['attribute1', 'attribute2'];
45+
// $extraAttributes = ['attribute1', 'attribute2'];
4646

4747
$taskPreFactory = new DomainEvent(
4848
'origin',
@@ -52,8 +52,8 @@ function it_can_detect_a_optional_fields()
5252
array(1,2,3,4,5),
5353
$id,
5454
$isDeprecated,
55-
$correlationId,
56-
$extraAttributes
55+
$correlationId
56+
// $extraAttributes
5757
);
5858
$this->create(json_encode($taskPreFactory))->shouldBeLike($taskPreFactory);
5959
}

0 commit comments

Comments
 (0)