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