Welcome to mirror list, hosted at ThFree Co, Russian Federation.

EventLoopGroupTest.php « tests « aws-crt-php « aws - github.com/nextcloud/3rdparty.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6a52c69c0d5f8ca9434aed47f00eb26324624778 (plain)
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
<?php
/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */
use AWS\CRT\IO\EventLoopGroup as EventLoopGroup;

require_once('common.inc');

final class EventLoopGroupTest extends CrtTestCase {

    public function testLifetime() {
        $elg = new EventLoopGroup();
        $this->assertNotNull($elg, "Failed to create default EventLoopGroup");
        $elg = null;
    }

    public function testConstructionWithOptions() {
        $options = EventLoopGroup::defaults();
        $options['num_threads'] = 1;
        $elg = new EventLoopGroup($options);
        $this->assertNotNull($elg, "Failed to create EventLoopGroup with 1 thread");
        $elg = null;
    }
}