object-spy/tests/ExampleTest.php

20 lines
445 B
PHP

<?php
declare(strict_types=1);
namespace Danjones000\Test\Spy;
use Danjones000\Spy\Example;
use Mockery\MockInterface;
class ExampleTest extends TestCase
{
public function testGreet(): void
{
/** @var Example & MockInterface $example */
$example = $this->mockery(Example::class);
$example->shouldReceive('greet')->passthru();
$this->assertSame('Hello, Friends!', $example->greet('Friends'));
}
}