How can I differentiate in PHPUnit a Stub from a Mock.
The Stubs verify status, and only dedicate themselves to returning specific answers when called. The PHPUnit documentation on this is clear and the example is very illustrative:
// Create a stub for the SomeClass class.
$stub = $this->createMock(SomeClass::class);
// Configure the stub.
$stub->method('doSomething')
->willReturn('foo');
// Calling $stub->doSomething() will now return 'foo'.
$this->assertEquals('foo', $stub->doSomething());
When the method that is configured is called, it will return the response indicated.
In the case of the Mocks they verify behavior, they are not interested in returning values, but check that they pass through certain methods, how many times they pass, etc. But in PHPUnit this is not so clear, since there are no verify () methods (as they exist in others).
How would the creation of a Mock (not a Stub) be in PHPUnit?