summaryrefslogtreecommitdiff
path: root/vendor/aws/aws-crt-php/tests/ErrorTest.php
blob: e84d1edbfb1f549cc2f1e250330b4675dffea649 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */
use AWS\CRT\CRT;

final class ErrorTest extends PHPUnit_Framework_TestCase {

    public function testNoInitialError() {
        $this->assertEquals(0, CRT::last_error());
    }

    public function testCanResolveErrorName() {
        $this->assertEquals("AWS_ERROR_SUCCESS", CRT::error_name(0));
    }

    public function testCanResolveErrorStr() {
        $this->assertEquals("Success.", CRT::error_str(0));
    }
}