Page MenuHomeDevCentral

Test a GitHub ping payload, events disabled
ClosedPublic

Authored by dereckson on Jan 9 2016, 04:00.
Tags
None
Referenced Files
F12101476: D195.id464.diff
Sat, Oct 4, 10:00
F12100900: D195.diff
Sat, Oct 4, 09:53
F12100345: D195.id463.diff
Sat, Oct 4, 09:50
F12076104: D195.id.diff
Thu, Oct 2, 14:49
Unknown Object (File)
Mon, Sep 29, 00:18
Unknown Object (File)
Sun, Sep 28, 18:30
Unknown Object (File)
Sun, Sep 28, 18:30
Unknown Object (File)
Sun, Sep 28, 18:29
Subscribers
None

Details

Reviewers
dereckson
Commits
Unknown Object (Diffusion Commit)
rNOTIF7b342bbc1f18: Test a GitHub ping payload, events disabled
Summary

Test purpose

This test fires the first GitHub event we received, a ping
with a zen aphorism. A blank report should be received,
with correct gate an door.

Services service provider change

To play nice with the Laravel testing recommandation to use
a Illuminate\Contracts\Events\Dispatcher mock for the events
dispatcher, we update the ServicesServiceProvider expectation
to use the interface contract, not the actual implementation.

New methods to TestCase

  • disableEvents to mock the events dispatcher
  • sendJsonPayload allows to send an object as JSON payload
  • sendPayload allows to send a raw payload

Laravel offers a way to disable events from testing, but this
only expects the fire method, not a listen method.

Test Plan

phpunit --no-coverage

Diff Detail

Repository
rNOTIF Notifications center
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson retitled this revision from to Test a GitHub ping payload, events disabled.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson updated this object.
dereckson updated this object.
dereckson added inline comments.
tests/Http/Controllers/GitHubGateControllerTest.php
11

Disables

tests/TestCase.php
37

Visits

55

Visits

dereckson edited edge metadata.

TestCase::disableEvents

dereckson updated this object.
dereckson edited edge metadata.
dereckson updated this object.
dereckson edited edge metadata.
This revision is now accepted and ready to land.Jan 9 2016, 04:19
This revision was automatically updated to reflect the committed changes.