Page MenuHomeDevCentral

Test a GitHub ping payload, events disabled
ClosedPublic

Authored by dereckson on Jan 9 2016, 04:00.
Tags
None
Referenced Files
F3633799: D195.id461.diff
Mon, Oct 7, 14:27
F3633786: D195.id463.diff
Mon, Oct 7, 14:23
F3633785: D195.id462.diff
Mon, Oct 7, 14:23
F3633784: D195.id464.diff
Mon, Oct 7, 14:22
F3633778: D195.id465.diff
Mon, Oct 7, 14:20
F3633522: D195.diff
Mon, Oct 7, 12:31
Unknown Object (File)
Fri, Oct 4, 15:05
Unknown Object (File)
Thu, Oct 3, 12:09
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.