From b620405ab058e9b05f7da266f95486a3f6c24a53 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 22 May 2011 09:08:30 +0200 Subject: [PATCH] Adjusted BasePackage::__toString() --- src/Composer/Package/BasePackage.php | 2 +- tests/Composer/Test/Package/MemoryPackageTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Package/BasePackage.php b/src/Composer/Package/BasePackage.php index 7ffea71e5..ec05fa7be 100644 --- a/src/Composer/Package/BasePackage.php +++ b/src/Composer/Package/BasePackage.php @@ -120,7 +120,7 @@ abstract class BasePackage implements PackageInterface */ public function __toString() { - return $this->getName().'-'.$this->getReleaseType().'-'.$this->getVersion(); + return $this->getName().'-'.$this->getVersion().'-'.$this->getReleaseType(); } /** diff --git a/tests/Composer/Test/Package/MemoryPackageTest.php b/tests/Composer/Test/Package/MemoryPackageTest.php index 7f8cc269e..7176b8e4a 100644 --- a/tests/Composer/Test/Package/MemoryPackageTest.php +++ b/tests/Composer/Test/Package/MemoryPackageTest.php @@ -24,6 +24,6 @@ class MemoryPackageTest extends \PHPUnit_Framework_TestCase $this->assertEquals('1', $package->getVersion()); $this->assertEquals('beta', $package->getReleaseType()); - $this->assertEquals('foo-beta-1', (string) $package); + $this->assertEquals('foo-1-beta', (string) $package); } }