Code Duplication    Length = 77-77 lines in 2 locations

Serializer/tests/Event/ActorEventSubscriberTest.php 1 location

@@ 19-95 (lines=77) @@
16
/**
17
 * @author Christian Flothmann <[email protected]>
18
 */
19
class ActorEventSubscriberTest extends AddDataSubscriberTest
20
{
21
    protected function setUp()
22
    {
23
        $this->eventSubscriber = new ActorEventSubscriber();
24
    }
25
26
    public function getEventData()
27
    {
28
        return array(
29
            array(
30
                array('name' => 'Xabbuh\XApi\Model\Actor'),
31
                array(
32
                    'name' => 'Christian',
33
                    'mbox' => 'mailto:[email protected]',
34
                ),
35
                array(
36
                    'name' => 'Christian',
37
                    'mbox' => 'mailto:[email protected]',
38
                    'objectType' => 'Agent',
39
                ),
40
            ),
41
            array(
42
                array('name' => 'Xabbuh\XApi\Model\Actor'),
43
                array(
44
                    'name' => 'Example Group',
45
                    'account' => array(
46
                        'homePage' => 'http://example.com/homePage',
47
                        'name' => 'GroupAccount',
48
                    ),
49
                    'member' => array(),
50
                    'objectType' => 'Group',
51
                ),
52
                array(
53
                    'name' => 'Example Group',
54
                    'account' => array(
55
                        'homePage' => 'http://example.com/homePage',
56
                        'name' => 'GroupAccount',
57
                    ),
58
                    'member' => array(),
59
                    'objectType' => 'Group',
60
                ),
61
            ),
62
            array(
63
                array('name' => 'Xabbuh\XApi\Model\Object'),
64
                array(
65
                    'id' => 'http://www.example.co.uk/exampleactivity',
66
                    'definition' => array(
67
                        'name' => array(
68
                            'en-GB' => 'example activity',
69
                            'en-US' => 'example activity',
70
                        ),
71
                        'description' => array(
72
                            'en-GB' => 'An example of an activity',
73
                            'en-US' => 'An example of an activity',
74
                        ),
75
                        'type' => 'http://www.example.co.uk/types/exampleactivitytype',
76
                    ),
77
                ),
78
                array(
79
                    'id' => 'http://www.example.co.uk/exampleactivity',
80
                    'definition' => array(
81
                        'name' => array(
82
                            'en-GB' => 'example activity',
83
                            'en-US' => 'example activity',
84
                        ),
85
                        'description' => array(
86
                            'en-GB' => 'An example of an activity',
87
                            'en-US' => 'An example of an activity',
88
                        ),
89
                        'type' => 'http://www.example.co.uk/types/exampleactivitytype',
90
                    ),
91
                ),
92
            )
93
        );
94
    }
95
}
96

Serializer/tests/Event/ObjectEventSubscriberTest.php 1 location

@@ 19-95 (lines=77) @@
16
/**
17
 * @author Christian Flothmann <[email protected]>
18
 */
19
class ObjectEventSubscriberTest extends AddDataSubscriberTest
20
{
21
    protected function setUp()
22
    {
23
        $this->eventSubscriber = new ObjectEventSubscriber();
24
    }
25
26
    public function getEventData()
27
    {
28
        return array(
29
            array(
30
                array('name' => 'Xabbuh\XApi\Model\Object'),
31
                array(
32
                    'id' => 'http://www.example.co.uk/exampleactivity',
33
                    'definition' => array(
34
                        'name' => array(
35
                            'en-GB' => 'example activity',
36
                            'en-US' => 'example activity',
37
                        ),
38
                        'description' => array(
39
                            'en-GB' => 'An example of an activity',
40
                            'en-US' => 'An example of an activity',
41
                        ),
42
                        'type' => 'http://www.example.co.uk/types/exampleactivitytype',
43
                    ),
44
                ),
45
                array(
46
                    'id' => 'http://www.example.co.uk/exampleactivity',
47
                    'definition' => array(
48
                        'name' => array(
49
                            'en-GB' => 'example activity',
50
                            'en-US' => 'example activity',
51
                        ),
52
                        'description' => array(
53
                            'en-GB' => 'An example of an activity',
54
                            'en-US' => 'An example of an activity',
55
                        ),
56
                        'type' => 'http://www.example.co.uk/types/exampleactivitytype',
57
                    ),
58
                    'objectType' => 'Activity',
59
                ),
60
            ),
61
            array(
62
                array('name' => 'Xabbuh\XApi\Model\Object'),
63
                array(
64
                    'name' => 'Example Group',
65
                    'account' => array(
66
                        'homePage' => 'http://example.com/homePage',
67
                        'name' => 'GroupAccount',
68
                    ),
69
                    'member' => array(),
70
                    'objectType' => 'Group',
71
                ),
72
                array(
73
                    'name' => 'Example Group',
74
                    'account' => array(
75
                        'homePage' => 'http://example.com/homePage',
76
                        'name' => 'GroupAccount',
77
                    ),
78
                    'member' => array(),
79
                    'objectType' => 'Group',
80
                ),
81
            ),
82
            array(
83
                array('name' => 'Xabbuh\XApi\Model\Actor'),
84
                array(
85
                    'name' => 'Christian',
86
                    'mbox' => 'mailto:[email protected]',
87
                ),
88
                array(
89
                    'name' => 'Christian',
90
                    'mbox' => 'mailto:[email protected]',
91
                ),
92
            ),
93
        );
94
    }
95
}
96