From b04d938319e32ad630a1da1320473204ed4ab125 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 6 Dec 2012 10:07:57 +0100 Subject: [PATCH] Fix test to reduce cross-platform issues --- tests/Composer/Test/Script/EventDispatcherTest.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/Composer/Test/Script/EventDispatcherTest.php b/tests/Composer/Test/Script/EventDispatcherTest.php index 46f8a2383..866d111b8 100644 --- a/tests/Composer/Test/Script/EventDispatcherTest.php +++ b/tests/Composer/Test/Script/EventDispatcherTest.php @@ -157,7 +157,7 @@ class EventDispatcherTest extends TestCase ->setMethods(array('getListeners')) ->getMock(); - $code = sprintf('echo bar>&2 %s exit 1', defined('PHP_WINDOWS_VERSION_BUILD') ? '&' : ';'); + $code = 'exit 1'; $listener = array($code); $dispatcher->expects($this->atLeastOnce()) ->method('getListeners') @@ -165,11 +165,9 @@ class EventDispatcherTest extends TestCase $io->expects($this->once()) ->method('write') - ->with($this->equalTo('Script '.$code.' handling the post-install-cmd event returned with an error: bar '.PHP_EOL.'')); + ->with($this->equalTo('Script '.$code.' handling the post-install-cmd event returned with an error: ')); - ob_start(); $dispatcher->dispatchCommandEvent("post-install-cmd", false); - $this->assertEquals('bar', trim(ob_get_clean())); } public static function call()