<?php
use From\Somewhere\ExternalHandler;
class MyClass
{
public function _construct(
private readonly ExternalHandler $handler
) {
}
public function testingMethod($arg)
{
$somethingData = $this->handler->doSomething($arg);
if($somethingData === 'something') {
return false;
}
return $somethingData;
}
}
->with($this->createMock(\Nyholm\Psr7\Request::class))