Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into feature/math-biginteger
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
12 changes: 2 additions & 10 deletions src/ModuleEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,11 @@ public function getConfigListener()
/**
* Set module object to compose in this event
*
* @param Listener\ConfigMergerInterface $listener
* @param Listener\ConfigMergerInterface $configListener
* @return ModuleEvent
*/
public function setConfigListener($configListener)
public function setConfigListener(Listener\ConfigMergerInterface $configListener)
{
if (!$configListener instanceof Listener\ConfigMergerInterface) {
throw new Exception\InvalidArgumentException(sprintf(
'%s::%s() expects an object implementing Zend\ModuleManager\Listener\ConfigMergerInterface as an argument; %s provided',
__CLASS__,
__METHOD__,
(is_object($configListener) ? get_class($configListener) : gettype($configListener))
));
}
$this->setParam('configListener', $configListener);
return $this;
}
Expand Down
6 changes: 0 additions & 6 deletions test/ModuleEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,4 @@ public function testCanRetrieveConfigListenerViaGetter()
$test = $this->event->getConfigListener();
$this->assertSame($configListener, $test);
}

public function testPassingNonConfigMergerToSetConfigListenerRaisesException()
{
$this->setExpectedException('Zend\ModuleManager\Exception\InvalidArgumentException');
$this->event->setConfigListener(new StdClass);
}
}

0 comments on commit 1b4e215

Please sign in to comment.