Skip to content

[5.8] Return fake objects from facades#27680

Merged
taylorotwell merged 2 commits intolaravel:5.8from
BertvanHoekelen:5.8
Feb 27, 2019
Merged

[5.8] Return fake objects from facades#27680
taylorotwell merged 2 commits intolaravel:5.8from
BertvanHoekelen:5.8

Conversation

@BertvanHoekelen
Copy link
Copy Markdown
Contributor

For consistency in facade fakes I have added the fakes a return type. That way I can create a property for the fake in the test's setUp method.

Current

public function setUp()
{
    parent::setUp();

    Bus::fake();
    $this->eventBus = $this->app->make(Dispatcher::class);
}

New

public function setUp()
{
    parent::setUp();

    $this->eventBus = Bus::fake();
}

@BertvanHoekelen BertvanHoekelen changed the title Return fake objects from facades [5.8] Return fake objects from facades Feb 26, 2019
@taylorotwell
Copy link
Copy Markdown
Member

All return doc blocks should be fully qualified to match the rest of the framework.

@taylorotwell taylorotwell merged commit c385d42 into laravel:5.8 Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants