Code Duplication    Length = 11-14 lines in 3 locations

app/Test/Case/Controller/UsersControllerTest.php 3 locations

@@ 963-976 (lines=14) @@
960
			$this->assertTextContains('dropdown', $result);
961
		}
962
963
		public function testViewModButtonEmpty() {
964
			/**
965
			 * Mod menu is currently empty for mod
966
			 */
967
			Configure::write('Saito.Settings.block_user_ui', false);
968
969
			$Users = $this->generate('Users');
970
971
			$this->_loginUser(2);
972
			$result = $this->testAction('users/view/5', array(
973
					'return' => 'view'
974
			));
975
			$this->assertTextNotContains('dropdown', $result);
976
		}
977
978
		public function testViewModButtonBlockUiTrue() {
979
			Configure::write('Saito.Settings.block_user_ui', true);
@@ 978-988 (lines=11) @@
975
			$this->assertTextNotContains('dropdown', $result);
976
		}
977
978
		public function testViewModButtonBlockUiTrue() {
979
			Configure::write('Saito.Settings.block_user_ui', true);
980
981
			$Users = $this->generate('Users');
982
983
			$this->_loginUser(2);
984
			$result = $this->testAction('users/view/5', array(
985
					'return' => 'view'
986
			));
987
			$this->assertXPath($result, '//input[@value=5][@id="UserLockUserId"]');
988
		}
989
990
		public function testViewModButtonBlockUiFalse() {
991
			Configure::write('Saito.Settings.block_user_ui', false);
@@ 990-1000 (lines=11) @@
987
			$this->assertXPath($result, '//input[@value=5][@id="UserLockUserId"]');
988
		}
989
990
		public function testViewModButtonBlockUiFalse() {
991
			Configure::write('Saito.Settings.block_user_ui', false);
992
993
			$Users = $this->generate('Users');
994
995
			$this->_loginUser(2);
996
			$result = $this->testAction('users/view/5', array(
997
					'return' => 'view'
998
			));
999
			$this->assertTextNotContains('users/lock/5', $result);
1000
		}
1001
1002
	}
1003