Page MenuHomeDevCentral

Test a GitHub ping payload, events disabled
ClosedPublic

Authored by dereckson on Jan 9 2016, 04:00.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 4, 15:05
Unknown Object (File)
Thu, Oct 3, 12:09
Unknown Object (File)
Mon, Sep 30, 17:45
Unknown Object (File)
Mon, Sep 30, 17:27
Unknown Object (File)
Sat, Sep 28, 05:53
Unknown Object (File)
Sat, Sep 14, 22:18
Unknown Object (File)
Sat, Sep 14, 22:17
Unknown Object (File)
Sat, Sep 14, 22:17
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
No Lint Coverage
Unit
Tests Passed
Branch
tests
Build Status
Buildable 246
Build 246: arc lint + arc unit

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.