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)
Wed, Nov 13, 11:57
Unknown Object (File)
Sat, Nov 9, 17:04
Unknown Object (File)
Sat, Nov 9, 14:53
Unknown Object (File)
Wed, Nov 6, 20:54
Unknown Object (File)
Wed, Nov 6, 18:46
Unknown Object (File)
Thu, Oct 31, 15:04
Unknown Object (File)
Fri, Oct 18, 17:56
Unknown Object (File)
Oct 18 2024, 02: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
No Lint Coverage
Unit
Tests Passed
Branch
tests
Build Status
Buildable 245
Build 245: 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.