Skip to content

Some currently unsupported cases #3

@arnaud-lb

Description

@arnaud-lb

Some expectation methods

$mock = Mockery::mock(Something::class);
$mock
    ->shouldReceive('foo')
    ->andReturn(null)
    ->shouldReceive('bar');

Currently, the second shouldReceive call will trigger this error: Call to an undefined method Mockery\Expectation::shouldReceive().

Partial mocks

$mock = Mockery::mock('Foo\Bar[method1,method2]');

Currently, $mock is assumed to be of type Foo\Bar[method1,method2]

Methods returning Mock

$mock = Mockery::mock(Bar::class)->shouldDeferMissing();

Currently, methods returning Mockery\Mock will just return that, instead of an intersection type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions