PEAR2_Net_TransmitterPEAR2_Net_Transmitter-1.0.0a5/tests/ClientEncryptedTest.php

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
<?php

namespace PEAR2\Net\Transmitter;

require_once 'ClientTest.php';

class ClientEncryptedTest extends ClientTest
{
    public function setUp()
    {
        $this->client = new TcpClient(
            REMOTE_HOSTNAME,
            REMOTE_PORT,
            false,
            null,
            '',
            NetworkStream::CRYPTO_TLS,
            stream_context_create(
                array(
                    'ssl' => array(
                        'verify_peer'
                            => true,
                        'cafile'
                            => __DIR__ . DIRECTORY_SEPARATOR . CERTIFICATE_FILE
                    )
                )
            )
        );
    }
}
EOF