Code Duplication    Length = 10-10 lines in 2 locations

tests/unit/SiteTreePublishingEngineTest.php 2 locations

@@ 268-277 (lines=10) @@
265
		return $obj;
266
	}
267
268
	public function objectsToUpdate($context) {
269
270
		switch ($context['action']) {
271
			case 'publish':
272
				return new ArrayList(array($this->generatePublishable('/updateOnPublish', 10)));
273
			case 'unpublish':
274
				return new ArrayList(array($this->generatePublishable('/updateOnUnpublish', 10)));
275
		}
276
277
	}
278
279
	/**
280
	 * Remove the object on unpublishing (the parent will get updated via objectsToUpdate).
@@ 282-291 (lines=10) @@
279
	/**
280
	 * Remove the object on unpublishing (the parent will get updated via objectsToUpdate).
281
	 */
282
	public function objectsToDelete($context) {
283
284
		switch ($context['action']) {
285
			case 'publish':
286
				return new ArrayList(array($this->generatePublishable('/deleteOnPublish', 10)));
287
			case 'unpublish':
288
				return new ArrayList(array($this->generatePublishable('/deleteOnUnpublish', 10)));
289
		}
290
291
	}
292
293
}
294