An open API service indexing awesome lists of open source software.

https://github.com/php-ecma-intl/test

🧪 Conformance test suite for pecl/ecma_intl
https://github.com/php-ecma-intl/test

ecma402 i18n icu internationalization intl l10n localization php test unicode

Last synced: 25 days ago
JSON representation

🧪 Conformance test suite for pecl/ecma_intl

Awesome Lists containing this project

README

          

php-ecma-intl/test


Conformance test suite for pecl/ecma_intl

## About

This is a PHP port of the `intl402` test suite for [ECMA-402](https://tc39.es/ecma402/)
from [Test262](https://github.com/tc39/test262). This port is up-to-date with
Test262, as of the version of Test262 included in this project as a Git
submodule at `./resources/test262`.

Since PHP does not follow the same conventions as JavaScript, PHP code
implementing ECMA-402 will differ from the specification. Where it differs,
this test suite follows the reference implementation for
[pecl/ecma_intl](https://github.com/php-ecma-intl/ext). Polyfills may use
this test suite to ensure compatibility with pecl/ecma_intl.

This project adheres to a [code of conduct](CODE_OF_CONDUCT.md). By
participating in this project and its community, you are expected to uphold
this code.

## Installation

Install this package as a dependency using [Composer](https://getcomposer.org).

``` bash
composer require --dev php-ecma-intl/test
```

## Usage

Use these tests to ensure your polyfill library conforms to the pecl/ecma_intl
implementation of [ECMA-402](https://tc39.es/ecma402/).

To add these tests to your project's test runner, add the following to your
project's `phpunit.xml` or `phpunit.xml.dist` file:

```xml


./vendor/php-ecma-intl/test/tests

```

Then, create a file (if you don't already have one) at `tests/Pest.php`, and
add the following to it:

```php
include_once __DIR__ . '/vendor/php-ecma-intl/test/harness/testIntl.php';
```

Now, you may run `vendor/bin/pest --testsuite "ecma_intl conformance"` to
execute the conformance tests provided by this package.

## Contributing

Contributions are welcome! To contribute, please familiarize yourself with
[CONTRIBUTING.md](CONTRIBUTING.md).

## Coordinated Disclosure

Keeping user information safe and secure is a top priority, and we welcome the
contribution of external security researchers. If you believe you've found a
security issue in software that is maintained in this repository, please read
[SECURITY.md](SECURITY.md) for instructions on submitting a vulnerability report.

## Copyright and License

pecl/ecma_intl is copyright © [php-ecma-intl](https://github.com/php-ecma-intl)
contributors and licensed for use under the terms of the BSD 3-Clause "New" or
"Revised" License (BSD-3-Clause). Please see [LICENSE](LICENSE) for more
information.

php-ecma-intl/test may utilize copyrighted material under license from the
following projects:

- [Test262: ECMAScript Test Suite](https://github.com/tc39/test262)

Please see [NOTICE](NOTICE) for more information.