Code Duplication    Length = 17-21 lines in 2 locations

eZ/Publish/API/Repository/Tests/UserServiceTest.php 2 locations

@@ 869-885 (lines=17) @@
866
     * @see \eZ\Publish\API\Repository\UserService::newUserCreateStruct()
867
     * @depends eZ\Publish\API\Repository\Tests\UserServiceTest::testNewUserCreateStruct
868
     */
869
    public function testNewUserCreateStructSetsExpectedProperties($userCreate)
870
    {
871
        $this->assertEquals(
872
            array(
873
                'login' => 'user',
874
                'email' => '[email protected]',
875
                'password' => 'secret',
876
                'mainLanguageCode' => 'eng-US',
877
            ),
878
            array(
879
                'login' => $userCreate->login,
880
                'email' => $userCreate->email,
881
                'password' => $userCreate->password,
882
                'mainLanguageCode' => $userCreate->mainLanguageCode,
883
            )
884
        );
885
    }
886
887
    /**
888
     * Test for the newUserCreateStruct() method.
@@ 952-972 (lines=21) @@
949
     * @see \eZ\Publish\API\Repository\UserService::createUser()
950
     * @depends eZ\Publish\API\Repository\Tests\UserServiceTest::testCreateUser
951
     */
952
    public function testCreateUserSetsExpectedProperties(User $user)
953
    {
954
        $this->assertEquals(
955
            array(
956
                'login' => 'user',
957
                'email' => '[email protected]',
958
                'passwordHash' => $this->createHash(
959
                    'user',
960
                    'secret',
961
                    $user->hashAlgorithm
962
                ),
963
                'mainLanguageCode' => 'eng-US',
964
            ),
965
            array(
966
                'login' => $user->login,
967
                'email' => $user->email,
968
                'passwordHash' => $user->passwordHash,
969
                'mainLanguageCode' => $user->contentInfo->mainLanguageCode,
970
            )
971
        );
972
    }
973
974
    /**
975
     * Test for the createUser() method.