/** * Set up the Notification with the given NotificationConfiguration. * * @throws InvalidArgumentException * * @param NotificationConfiguration $configuration * * @return Notifiy $this */ public function configure(NotificationConfiguration $configuration) { if (!$configuration->hasAttribute('filename')) { throw new InvalidArgumentException('The given configuration does not contain the "filename" attribute.'); } return $this->setFile($configuration->getAttribute('filename')->getValue()); }
/** * @depends testRetrieve */ public function testHasAttributeValid() { $this->assertTrue($this->configuration->hasAttribute('filename')); }