r108525 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108524‎ | r108525 | r108526 >
Date:17:56, 10 January 2012
Author:bsitu
Status:deferred
Tags:
Comment:
followup to -r108486 - update API return key from "status" to "result"
Modified paths:
  • /branches/concurrency/includes/api/ApiConcurrency.php (modified) (history)
  • /branches/concurrency/tests/phpunit/includes/api/ApiConcurrencyTest.php (modified) (history)

Diff [purge]

Index: branches/concurrency/tests/phpunit/includes/api/ApiConcurrencyTest.php
@@ -84,7 +84,7 @@
8585 'record' => 1,
8686 'resourcetype' => 'responding-to-moodbar-feedback'), $sessionArray['one'], self::$users['one']->user );
8787
88 - $this->assertEquals( "success", $result['concurrency']['status'] );
 88+ $this->assertEquals( "success", $result['concurrency']['result'] );
8989
9090 $wgUser = self::$users['two']->user;
9191
@@ -94,7 +94,7 @@
9595 'record' => 1,
9696 'resourcetype' => 'responding-to-moodbar-feedback'), $sessionArray['two'], self::$users['two']->user );
9797
98 - $this->assertEquals( "failure", $result['concurrency']['status'] );
 98+ $this->assertEquals( "failure", $result['concurrency']['result'] );
9999
100100 list( $result, , $session ) = $this->doApiRequestWithToken( array(
101101 'action' => 'concurrency',
@@ -102,7 +102,7 @@
103103 'record' => 2,
104104 'resourcetype' => 'responding-to-moodbar-feedback'), $sessionArray['two'], self::$users['two']->user );
105105
106 - $this->assertEquals( "success", $result['concurrency']['status'] );
 106+ $this->assertEquals( "success", $result['concurrency']['result'] );
107107
108108 }
109109
@@ -122,7 +122,7 @@
123123 'record' => 1,
124124 'resourcetype' => 'responding-to-moodbar-feedback'), $sessionArray['one'], self::$users['one']->user );
125125
126 - $this->assertEquals( "success", $result['concurrency']['status'] );
 126+ $this->assertEquals( "success", $result['concurrency']['result'] );
127127
128128 list( $result, , $session ) = $this->doApiRequestWithToken( array(
129129 'action' => 'concurrency',
@@ -130,7 +130,7 @@
131131 'record' => 2,
132132 'resourcetype' => 'responding-to-moodbar-feedback'), $sessionArray['one'], self::$users['one']->user );
133133
134 - $this->assertEquals( "failure", $result['concurrency']['status'] );
 134+ $this->assertEquals( "failure", $result['concurrency']['result'] );
135135
136136 $wgUser = self::$users['two']->user;
137137
@@ -140,7 +140,7 @@
141141 'record' => 2,
142142 'resourcetype' => 'responding-to-moodbar-feedback'), $sessionArray['two'], self::$users['two']->user );
143143
144 - $this->assertEquals( "success", $result['concurrency']['status'] );
 144+ $this->assertEquals( "success", $result['concurrency']['result'] );
145145
146146 }
147147
Index: branches/concurrency/includes/api/ApiConcurrency.php
@@ -24,10 +24,10 @@
2525 case 'checkout':
2626 case 'checkin':
2727 if ( $concurrencyCheck->$params['ccaction']( $params['record'] ) ) {
28 - $res['status'] = 'success';
 28+ $res['result'] = 'success';
2929 }
3030 else {
31 - $res['status'] = 'failure';
 31+ $res['result'] = 'failure';
3232 }
3333 break;
3434

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108486API and UnitTest Cases for Concurrency functionsbsitu01:49, 10 January 2012

Status & tagging log