1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 00:53:06 +00:00

Pass the current dev mode to the event dispatcher, which in turn passes it to the events fired. This can be fetched in scripts to check which mode we are currently in

This commit is contained in:
Christer Edvartsen 2012-11-15 15:29:25 +01:00
parent 172414a1f0
commit 4b8813269c
5 changed files with 35 additions and 15 deletions

View file

@ -32,7 +32,7 @@ class EventDispatcherTest extends TestCase
->method('write')
->with('<error>Script Composer\Test\Script\EventDispatcherTest::call handling the post-install-cmd event terminated with an exception</error>');
$dispatcher->dispatchCommandEvent("post-install-cmd");
$dispatcher->dispatchCommandEvent("post-install-cmd", false);
}
/**
@ -60,7 +60,7 @@ class EventDispatcherTest extends TestCase
->method('execute')
->with($command);
$dispatcher->dispatchCommandEvent("post-install-cmd");
$dispatcher->dispatchCommandEvent("post-install-cmd", false);
}
public function testDispatcherCanExecuteCliAndPhpInSameEventScriptStack()
@ -95,7 +95,7 @@ class EventDispatcherTest extends TestCase
->with('Composer\Test\Script\EventDispatcherTest', 'someMethod')
->will($this->returnValue(true));
$dispatcher->dispatchCommandEvent("post-install-cmd");
$dispatcher->dispatchCommandEvent("post-install-cmd", false);
}
private function getDispatcherStubForListenersTest($listeners, $io)