Code Duplication    Length = 12-12 lines in 2 locations

tests/phpunit/tests/user.php 2 locations

@@ 781-792 (lines=12) @@
778
	/**
779
	 * @ticket 33793
780
	 */
781
	public function test_wp_insert_user_should_reject_user_login_over_60_characters() {
782
		$user_login = str_repeat( 'a', 61 );
783
		$u = wp_insert_user( array(
784
			'user_login' => $user_login,
785
			'user_email' => $user_login . '@example.com',
786
			'user_pass' => 'password',
787
			'user_nicename' => 'something-short',
788
		) );
789
790
		$this->assertWPError( $u );
791
		$this->assertSame( 'user_login_too_long', $u->get_error_code() );
792
	}
793
794
	/**
795
	 * @ticket 33793
@@ 797-808 (lines=12) @@
794
	/**
795
	 * @ticket 33793
796
	 */
797
	public function test_wp_insert_user_should_reject_user_nicename_over_50_characters() {
798
		$user_nicename = str_repeat( 'a', 51 );
799
		$u = wp_insert_user( array(
800
			'user_login' => 'mynicenamehas50chars',
801
			'user_email' => $user_nicename . '@example.com',
802
			'user_pass' => 'password',
803
			'user_nicename' => $user_nicename,
804
		) );
805
806
		$this->assertWPError( $u );
807
		$this->assertSame( 'user_nicename_too_long', $u->get_error_code() );
808
	}
809
810
	/**
811
	 * @ticket 33793