MocksApplicationServices::expectsModelEvents()

$this expectsModelEvents(string $model, array|string $events) Specify a list of events that should be fired for the given operation. These events will be mocked, so that handlers will not actually be executed. Parameters string $model array|string $events Return Value $this Exceptions Exception

MocksApplicationServices::expectsEvents()

$this expectsEvents(array|string $events) Specify a list of events that should be fired for the given operation. These events will be mocked, so that handlers will not actually be executed. Parameters array|string $events Return Value $this Exceptions Exception

MocksApplicationServices::doesntExpectModelEvents()

$this doesntExpectModelEvents(string $model, array|string $events) Specify a list of events that should not be fired for the given operation. These events will be mocked, so that handlers will not actually be executed. Parameters string $model array|string $events Return Value $this Exceptions Exception

MocksApplicationServices::doesntExpectEvents()

$this doesntExpectEvents(array|string $events) Specify a list of events that should not be fired for the given operation. These events will be mocked, so that handlers will not actually be executed. Parameters array|string $events Return Value $this

MocksApplicationServices

MocksApplicationServices trait MocksApplicationServices (View source) Methods $this expectsEvents(array|string $events) Specify a list of events that should be fired for the given operation. $this doesntExpectEvents(array|string $events) Specify a list of events that should not be fired for the given operation. $this expectsModelEvents(string $model, array|string $events) Specify a list of events that should be fired for the given operation. $this doesntExpectModelEvents(st

Mocking

Mocking Introduction Events Using Mocks Using Fakes Jobs Using Mocks Using Fakes Mail Fakes Notification Fakes Facades Introduction When testing Laravel applications, you may wish to "mock" certain aspects of your application so they are not actually executed during a given test. For example, when testing a controller that fires an event, you may wish to mock the event listeners so they are not actually executed during the test. This allows you to only test the controller's HTTP response

Migrator::__construct()

void __construct(MigrationRepositoryInterface $repository, ConnectionResolverInterface $resolver, Filesystem $files) Create a new migrator instance. Parameters MigrationRepositoryInterface $repository ConnectionResolverInterface $resolver Filesystem $files Return Value void

Migrator::setConnection()

void setConnection(string $name) Set the default connection name. Parameters string $name Return Value void

Migrator::runMigrationList()

void runMigrationList(array $migrations, array $options = array()) Run an array of migrations. Parameters array $migrations array $options Return Value void

Migrator::run()

array run(array|string $paths = array(), array $options = array()) Run the outstanding migrations at a given path. Parameters array|string $paths array $options Return Value array