entityMock = $this->createMock(EntityInterface::class); } public function testGetTaskLogEntity() { $this->assertSame($this->entityMock, $this->createTestInstance()->getTaskLogEntity()); } public function testIsForced() { $this->forced = true; $this->assertTrue($this->createTestInstance()->isForced()); } public function testGetName() { $this->assertEquals(TaskLogCancelledEvent::class, $this->createTestInstance()->getName()); } /** * @return TaskLogCancelledEvent */ private function createTestInstance() { return new TaskLogCancelledEvent($this->entityMock, $this->forced); } }