Ver código fonte

Adjusted BasePackage::__toString()

Jordi Boggiano 14 anos atrás
pai
commit
b620405ab0

+ 1 - 1
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();
     }
 
     /**

+ 1 - 1
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);
     }
 }