diff --git a/tests/Composer/Test/EventDispatcher/EventDispatcherTest.php b/tests/Composer/Test/EventDispatcher/EventDispatcherTest.php
index 7101350de..7d31a0860 100644
--- a/tests/Composer/Test/EventDispatcher/EventDispatcherTest.php
+++ b/tests/Composer/Test/EventDispatcher/EventDispatcherTest.php
@@ -289,7 +289,7 @@ class EventDispatcherTest extends TestCase
$io->expects($this->at(2))
->method('writeError')
- ->with($this->equalTo('Script '.$code.' handling the post-install-cmd event returned with an error'));
+ ->with($this->equalTo('Script '.$code.' handling the post-install-cmd event returned with error code 1'));
$this->setExpectedException('RuntimeException');
$dispatcher->dispatchScript(ScriptEvents::POST_INSTALL_CMD, false);