Closed bjornpost closed 8 years ago
By analyzing the blame information on this pull request, we identified @adlawson, @sjparkinson and @h-bragg to be potential reviewers
Not sure on how to fix the broken tests. Directions welcome :-).
Within the file SqsAdapterTest.php
testEnqueue
method it expects some calls to metadata-get
with MessageAttributes.
This method should also include mocks for calls to 'DelaySeconds'.
$this->messageA->shouldRecieve('getMetadata->get')->once()->with('DelaySeconds')->andReturn(0);
and the sendMessageBatch
method should have entries for the DelaySeconds property:
['Id' => 0, 'MessageBody' => 'foo', 'MessageAttributes' => [], 'DelaySeconds' => 0],
Also there should be tests to ensure the DelaySettings functionally is actually working.
sendMessageBatch
We will also need to consider what the default behaviour here should be and write some specific tests for those.
sendMessageBatch
method or be set to 0.Does that make sense?
If you would like me to write some of these tests let me know.
@h-bragg Spend a good hour or so trying to fix these tests, but Mockery keeps throwing exceptions that do not make a lot of sense to me. If you would like to add the tests: go for it. :-)
@bjornpost I created a new branch (and PR) #36 which the tests as I am unable to modify your branch.
The tricky mockery exceptions are due to it not showing all of the differences between expected and actual arguments for method calls it is expecting.
Closing this in favor of #36
See #34