From b869fa9662f8f750d3a11dd5e4c7d3b19c947c5b Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Wed, 8 Jul 2015 19:36:13 +0200 Subject: [PATCH] Correct rule hash test --- tests/Composer/Test/DependencyResolver/RuleTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Composer/Test/DependencyResolver/RuleTest.php b/tests/Composer/Test/DependencyResolver/RuleTest.php index 6688b24aa..4382987eb 100644 --- a/tests/Composer/Test/DependencyResolver/RuleTest.php +++ b/tests/Composer/Test/DependencyResolver/RuleTest.php @@ -30,7 +30,8 @@ class RuleTest extends TestCase { $rule = new Rule(array(123), 'job1', null); - $this->assertEquals(substr(md5('123'), 0, 5), $rule->getHash()); + $hash = unpack('ihash', md5('123', true)); + $this->assertEquals($hash['hash'], $rule->getHash()); } public function testSetAndGetId()