Code Duplication    Length = 11-13 lines in 2 locations

app/Test/Case/Controller/EntriesControllerTest.php 1 location

@@ 723-733 (lines=11) @@
720
			$this->testAction('/entries/view/' . $id);
721
		}
722
723
		public function testViewIncreaseViewCounterLoggedIn() {
724
			$Entries = $this->generate('Entries', [
725
				'models' => ['Entry' => ['incrementViews']]
726
			]);
727
			$id = 1;
728
			$Entries->Entry->expects($this->once())
729
				->method('incrementViews')
730
				->with($id);
731
			$this->_loginUser(1);
732
			$this->testAction('/entries/view/' . $id);
733
		}
734
735
		/**
736
		 * don't increase view counter if user views its own posting

app/Test/Case/Controller/EsnotificationsControllerTest.php 1 location

@@ 28-40 (lines=13) @@
25
		'app.upload'
26
	);
27
28
	public function testUnsubscribe() {
29
		$Esnotifications = $this->generate('Esnotifications', array(
30
				'models' => array(
31
						'Esnotification' => array('deleteNotificationWithId')
32
						)
33
				));
34
		$Esnotifications->Esnotification->expects($this->once())
35
				->method('deleteNotificationWithId')
36
				->with(4)
37
				->will($this->returnValue(true));
38
39
		$result = $this->testAction('/esnotifications/unsubscribe/4/token:4234/');
40
	}
41
42
	public function testUnsubscribeWrongToken() {
43
		$Esnotifications = $this->generate('Esnotifications', array(