Flag of Ukraine
SymfonyCasts stands united with the people of Ukraine
Next Chapter

Challenge #1 of 1


Q: 

Suppose we have the following class:

class DinosaurHatcher
{
    public function __construct(private LoggerInterface $logger)
    {
    }

    public function getProgressTowardsHatching(): int
    {
        // ...
    }

    public function warmEgg(): void
    {
        // ...
    }
}

In a test for a different class, we decide to mock this:

$hatcher = $this->createMock(DinosaurHatcher::class);

What will happen if we call $hatcher->getProgressTowardsHatching() or $hatcher->warmEgg()?

userVoice