use App\Service;use Mockery;use Mockery\MockInterface;test('something can be mocked', function () { $this->instance( Service::class, Mockery::mock(Service::class, function (MockInterface $mock) { $mock->expects('process'); }) );});
use App\Service;use Mockery;use Mockery\MockInterface;public function test_something_can_be_mocked(): void{ $this->instance( Service::class, Mockery::mock(Service::class, function (MockInterface $mock) { $mock->expects('process'); }) );}
use App\Models\Thread;test('forum threads lock after one week of inactivity', function () { $thread = Thread::factory()->create(); $this->travel(1)->week(); expect($thread->isLockedByInactivity())->toBeTrue();});
use App\Models\Thread;public function test_forum_threads_lock_after_one_week_of_inactivity(): void{ $thread = Thread::factory()->create(); $this->travel(1)->week(); $this->assertTrue($thread->isLockedByInactivity());}