Code Duplication    Length = 17-19 lines in 4 locations

tests/TestCompose.php 1 location

@@ 26-42 (lines=17) @@
23
    }
24
25
26
    public function test_authRegister()
27
    {
28
29
        $output = $this->obRegister->authRegister(
30
            [
31
                "name" => 'Test',
32
                "email" => '[email protected]',
33
                "username" => 'test',
34
                "mob" => '1234567890',
35
                "passRegister" => 'testing'
36
            ]
37
        );
38
        $output = (array)json_decode($output);
39
        $this->assertEquals([
40
            'location' => 'http://127.0.0.1/openchat/views/account.php'
41
            ], $output);
42
    }
43
44
    /**
45
    * @depends test_authRegister

tests/TestReply.php 1 location

@@ 30-48 (lines=19) @@
27
    }
28
29
30
    public function test_authRegister()
31
    {
32
33
        $output = $this->obRegister->authRegister(
34
            [
35
                "name" => 'Test',
36
                "email" => '[email protected]',
37
                "username" => 'test',
38
                "mob" => '1234567890',
39
                "passRegister" => 'testing'
40
            ]
41
        );
42
        $output = (array)json_decode($output);
43
        $this->assertEquals([
44
            'location' => 'http://127.0.0.1/openchat/views/account.php'
45
            ], $output);
46
        $userId = Session::get('start');
47
        return $userId;
48
    }
49
50
    /**
51
    * @depends test_authRegister

tests/TestSearch.php 1 location

@@ 29-47 (lines=19) @@
26
    }
27
28
29
    public function test_authRegister()
30
    {
31
32
        $output = $this->obRegister->authRegister(
33
            [
34
                "name" => 'Test',
35
                "email" => '[email protected]',
36
                "username" => 'test',
37
                "mob" => '1234567890',
38
                "passRegister" => 'testing'
39
            ]
40
        );
41
        $output = (array)json_decode($output);
42
        $this->assertEquals([
43
            'location' => 'http://127.0.0.1/openchat/views/account.php'
44
            ], $output);
45
        $sessionId = session_id();
46
        return $sessionId;
47
    }
48
49
    /**
50
    * @depends test_authRegister

tests/TestUser.php 1 location

@@ 34-51 (lines=18) @@
31
    }
32
33
34
    public function test_authRegister()
35
    {
36
37
        $output = $this->obRegister->authRegister(
38
            [
39
                "name" => 'Test',
40
                "email" => '[email protected]',
41
                "username" => 'test',
42
                "mob" => '1234567890',
43
                "passRegister" => 'testing'
44
            ]
45
        );
46
        $output = (array)json_decode($output);
47
        $this->assertEquals([
48
            'location' => 'http://127.0.0.1/openchat/views/account.php'
49
            ], $output);
50
51
    }
52
53
    /**
54
    * @depends test_authRegister