October\Rain\Events\FakeDispatcher

Extends
  • Illuminate\Support\Testing\Fakes\EventFake
Implements
  • Illuminate\Contracts\Events\Dispatcher

Protected Properties

There are no protected properties in the class.

Show inherited protected properties

Inherited Protected Properties

  • $dispatcher - The original event dispatcher. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • $eventsToFake - The event types that should be intercepted instead of dispatched. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • $eventsToDispatch - The event types that should be dispatched instead of intercepted. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • $events - All of the events that have been intercepted keyed by type. (defined in Illuminate\Support\Testing\Fakes\EventFake)

Public Methods

public __construct()

public __construct($dispatcher, $eventsToFake = []): void

__construct a new event fake instance.

public fire()

public fire($args = null): void

fire proxies to dispatch

Show inherited public methods

Inherited Public Methods

  • assertDispatched() - Assert if an event was dispatched based on a truth-test callback. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • assertDispatchedTimes() - Assert if an event was dispatched a number of times. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • assertListening() - Assert if an event has a listener attached to it. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • assertNotDispatched() - Determine if an event was dispatched based on a truth-test callback. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • assertNothingDispatched() - Assert that no events were dispatched. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • dispatch() - Fire an event and call the listeners. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • dispatched() - Get all of the events matching a truth-test callback. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • except() - Specify the events that should be dispatched instead of faked. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • flush() - Flush a set of pushed events. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • forget() - Remove a set of listeners from the dispatcher. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • forgetPushed() - Forget all of the queued listeners. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • hasDispatched() - Determine if the given event has been dispatched. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • hasListeners() - Determine if a given event has listeners. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • listen() - Register an event listener with the dispatcher. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • push() - Register an event and payload to be dispatched later. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • subscribe() - Register an event subscriber with the dispatcher. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • until() - Dispatch an event and call the listeners. (defined in Illuminate\Support\Testing\Fakes\EventFake)

Protected Methods

Show inherited protected methods

Inherited Protected Methods

  • closureParameterTypes() - Get the class names / types of the parameters of the given Closure. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • firstClosureParameterType() - Get the class name of the first parameter of the given Closure. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • firstClosureParameterTypes() - Get the class names of the first parameter of the given Closure, including union types. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • shouldDispatchEvent() - Determine whether an event should be dispatched or not. (defined in Illuminate\Support\Testing\Fakes\EventFake)
  • shouldFakeEvent() - Determine if an event should be faked or actually dispatched. (defined in Illuminate\Support\Testing\Fakes\EventFake)