PEAR2_Net_RouterOS-1.0.0b4PEAR2_Net_RouterOS-1.0.0b4/tests/phpunit.xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
    bootstrap="bootstrap.php"
    colors="false"
    stopOnFailure="false"
    verbose="true"
    strict="true"

    convertErrorsToExceptions="true"
    convertNoticesToExceptions="true"
    convertWarningsToExceptions="true"
>
    <!--
    convertErrorsToExceptions="false"
    convertNoticesToExceptions="false"
    convertWarningsToExceptions="false"
>
    -->
    <php>
        <ini name="default_socket_timeout" value="4" />
        <!--
        The actual RouterOS machine and the port of the API service.

        The router is expected to contain at least two entries in
        "/queue/simple" and "/ip/arp", with those being HOSTNAME_INVALID and
        HOSTNAME_SILENT.
        
        -->
        <const name="HOSTNAME" value="ros.example.com" />
        <const name="PORT" value="8728" />
        
        <!--
        Port for encrypted connections. Must not be used at HOSTNAME_INVALID and
        HOSTNAME_SILENT.
        -->
        <const name="ENC_PORT" value="8729" />

        <!--
        A server with a different service at the API port.
        -->
        <const name="HOSTNAME_INVALID" value="invalid.ros.example.com" />
        <!--
        A port on which there's a service for all HOSTNAME_* addresses,
        but never the API one.
        -->
        <const name="PORT_INVALID" value="80" />

        <!--
        A device that doesn't answer at the API or the invalid port.
        -->
        <const name="HOSTNAME_SILENT" value="silent.ros.example.com" />
        <!--
        A port on which none of the hosts answers.
        -->
        <const name="PORT_SILENT" value="65534" />

        <!--
        A RouterOS username and password. Must have full privileges.
        -->
        <const name="USERNAME" value="apifull" />
        <const name="PASSWORD" value="apifull" />

        <!--
        A RouterOS username and password. Must not have writing privileges.
        -->
        <const name="USERNAME2" value="api" />
        <const name="PASSWORD2" value="api" />

        <!--
        A RouterOS username and password that uses non ASCII characters.
        Does not need to have any privileges beyond accessing the router.

        RouterOS forbids non ASCII usernames, but does not forbid non ASCII
        passwords, which is why these credentials are required for a special
        test.
        -->
        <const name="ANSI_USERNAME" value="api-ANSI" />
        <const name="ANSI_PASSWORD" value="апи" />

        <!--
        The ANSI charset of the password. Should match the charset for the
        locale of the device the password was defined from.
        -->
        <const name="ANSI_PASSWORD_CHARSET" value="windows-1251" />

        <!--
        A RouterOS username that doesn't exist.
        -->
        <const name="USERNAME_INVALID" value="tester" />
        <!--
        A RouterOS password that is not used by either valid RouterOS accounts.
        -->
        <const name="PASSWORD_INVALID" value="tester" />

        <!--
        A name for a test queue. It must be a name not currently in the list of
        simple queues. It's also a good idea to keep it ASCII compatible,
        because it's used in a charset test.
        -->
        <const name="TEST_QUEUE_NAME" value="TEST_QUEUE" />

        <!--
        Another name for a test queue. It must be a name not currently in the
        list of simple queues.
        -->
        <const name="TEST_QUEUE_NAME1" value="TEST_QUEUE1" />

        <!--
        A name for a test script. It must be a name not currently in the list of
        scripts. Also avoid any PHP function names.
        -->
        <const name="TEST_SCRIPT_NAME" value="API_TEST" />

        <!--
        A name for a test file. It must be a name not currently in the list of
        files.
        -->
        <const name="TEST_FILE_NAME" value="API_TEST.txt" />

    </php>
    <testsuites>
        <testsuite name="All Tests">
            <file>ConnectionTest.php</file>
            <file>RequestHandlingTest.php</file>

            <file>Client/Safe/NonPersistent/UnencryptedTest.php</file>
            <file>Client/Safe/Persistent/UnencryptedTest.php</file>
            <file>Util/Safe/NonPersistent/UnencryptedTest.php</file>
            <file>Util/Safe/Persistent/UnencryptedTest.php</file>

            <file>Client/Unsafe/NonPersistent/UnencryptedTest.php</file>
            <file>Client/Unsafe/Persistent/UnencryptedTest.php</file>
            <file>Util/Unsafe/NonPersistent/UnencryptedTest.php</file>
            <file>Util/Unsafe/Persistent/UnencryptedTest.php</file>

            <file>Client/Safe/NonPersistent/EncryptedTest.php</file>
            <file>Client/Safe/Persistent/EncryptedTest.php</file>
            <file>Util/Safe/NonPersistent/EncryptedTest.php</file>
            <file>Util/Safe/Persistent/EncryptedTest.php</file>

            <file>Client/Unsafe/NonPersistent/EncryptedTest.php</file>
            <file>Client/Unsafe/Persistent/EncryptedTest.php</file>
            <file>Util/Unsafe/NonPersistent/EncryptedTest.php</file>
            <file>Util/Unsafe/Persistent/EncryptedTest.php</file>

        </testsuite>
    </testsuites>
    <groups>
        <include>
            <group>Unencrypted</group>
            <group>NonPersistent</group>
            <group>Persistent</group>
            <group>Safe</group>
            <group>Unsafe</group>
            <group>Client</group>
            <group>Util</group>
            <group>Misc</group>
        </include>
        <exclude>
            <group>Encrypted</group>
        </exclude>
    </groups>
    <filter>
        <whitelist>
            <directory suffix=".php">../src/PEAR2/Net/RouterOS</directory>
        </whitelist>
    </filter>
</phpunit>
EOF