diff --git a/src/Cloner.php b/src/Cloner.php index 8284fec..6f57388 100644 --- a/src/Cloner.php +++ b/src/Cloner.php @@ -110,7 +110,7 @@ protected function saveClone($clone, $relation = null, $src, $child = null) { // Notify listeners via callback or event if (method_exists($clone, 'onCloning')) $clone->onCloning($src, $child); - $this->events->fire('cloner::cloning: '.get_class($src), [$clone, $src]); + $this->events->dispatch('cloner::cloning: '.get_class($src), [$clone, $src]); // Do the save if ($relation) $relation->save($clone); @@ -118,7 +118,7 @@ protected function saveClone($clone, $relation = null, $src, $child = null) { // Notify listeners via callback or event if (method_exists($clone, 'onCloned')) $clone->onCloned($src); - $this->events->fire('cloner::cloned: '.get_class($src), [$clone, $src]); + $this->events->dispatch('cloner::cloned: '.get_class($src), [$clone, $src]); } /** diff --git a/tests/FunctionalTest.php b/tests/FunctionalTest.php index 01b881f..0f87acd 100644 --- a/tests/FunctionalTest.php +++ b/tests/FunctionalTest.php @@ -49,7 +49,7 @@ protected function initUpchuck() { } protected function mockEvents() { - return m::mock('Illuminate\Events\Dispatcher', [ 'fire' => null ]); + return m::mock('Illuminate\Events\Dispatcher', [ 'dispatch' => null ]); } // https://github.com/laracasts/TestDummy/blob/master/tests/FactoryTest.php#L18