summaryrefslogtreecommitdiffstats
path: root/php-phpspec-prophecy-upstream.patch
blob: e293c3f956a063ae0a1b9cedcdd51b481e474a43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From ddc426cb8851c551a79b6872929ced532c3af207 Mon Sep 17 00:00:00 2001
From: Anyqax <mail@martinmenke.net>
Date: Tue, 14 Jun 2016 12:55:22 +0200
Subject: [PATCH] Fix incorrect method argument order

---
 src/Prophecy/Argument/Token/ObjectStateToken.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Prophecy/Argument/Token/ObjectStateToken.php b/src/Prophecy/Argument/Token/ObjectStateToken.php
index 8d93bfd..d771077 100644
--- a/src/Prophecy/Argument/Token/ObjectStateToken.php
+++ b/src/Prophecy/Argument/Token/ObjectStateToken.php
@@ -61,11 +61,11 @@ public function scoreArgument($argument)
             $actual = call_user_func(array($argument, $this->name));
 
             $comparator = $this->comparatorFactory->getComparatorFor(
-                $actual, $this->value
+                $this->value, $actual
             );
 
             try {
-                $comparator->assertEquals($actual, $this->value);
+                $comparator->assertEquals($this->value, $actual);
                 return 8;
             } catch (ComparisonFailure $failure) {
                 return false;