diff --git a/src/Composer/EventDispatcher/EventDispatcher.php b/src/Composer/EventDispatcher/EventDispatcher.php index 396f21731..e6cc378a0 100644 --- a/src/Composer/EventDispatcher/EventDispatcher.php +++ b/src/Composer/EventDispatcher/EventDispatcher.php @@ -469,7 +469,7 @@ class EventDispatcher */ protected function isComposerScript($callable) { - return '@composer ' === substr($callable, 0, 10); + return '@' === substr($callable, 0, 1) && '@php ' !== substr($callable, 0, 5); } /** diff --git a/tests/Composer/Test/Repository/Vcs/PerforceDriverTest.php b/tests/Composer/Test/Repository/Vcs/PerforceDriverTest.php index 987751408..05adbf030 100644 --- a/tests/Composer/Test/Repository/Vcs/PerforceDriverTest.php +++ b/tests/Composer/Test/Repository/Vcs/PerforceDriverTest.php @@ -122,8 +122,8 @@ class PerforceDriverTest extends TestCase public function testInitializeLogsInAndConnectsClient() { - $this->perforce->expects($this->at(0))->method('p4Login')->with($this->identicalTo($this->io)); - $this->perforce->expects($this->at(1))->method('checkStream')->with($this->equalTo(self::TEST_DEPOT)); + $this->perforce->expects($this->at(0))->method('p4Login'); + $this->perforce->expects($this->at(1))->method('checkStream'); $this->perforce->expects($this->at(2))->method('writeP4ClientSpec'); $this->perforce->expects($this->at(3))->method('connectClient'); $this->driver->initialize();