getSubscribedEvents(); $this->assertTrue(in_array(Events::onFlush, $events)); } public function testConstructThrowsExceptionOnInvalidParam() { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Invalid TimesheetCalculator implementation given. Expected CalculatorInterface but received stdClass'); new TimesheetSubscriber([new \stdClass()]); } }