/** * Test case for setName() with exception * * @expectedException \InvalidArgumentException * @expectedExceptionMessage Trigger name should be a string */ public function testSetNameWithException() { $triggerName = new \stdClass(); //non string $this->_object->setName($triggerName); }