php-ecma-intl / test
A conformance test suite for pecl/ecma_intl
Installs: 1 385
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.2
- pestphp/pest: ^2.9
Requires (Dev)
- ramsey/devtools: ^2.0
This package is auto-updated.
Last update: 2024-11-01 13:57:39 UTC
README
Conformance test suite for pecl/ecma_intl
About
This is a PHP port of the intl402
test suite for ECMA-402
from 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. Polyfills may use this test suite to ensure compatibility with pecl/ecma_intl.
This project adheres to a code of conduct. By participating in this project and its community, you are expected to uphold this code.
Installation
Install this package as a dependency using Composer.
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.
To add these tests to your project's test runner, add the following to your
project's phpunit.xml
or phpunit.xml.dist
file:
<testsuites> <testsuite name="ecma_intl conformance"> <directory suffix=".php">./vendor/php-ecma-intl/test/tests</directory> </testsuite> </testsuites>
Then, create a file (if you don't already have one) at tests/Pest.php
, and
add the following to it:
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.
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 for instructions on submitting a vulnerability report.
Copyright and License
pecl/ecma_intl is copyright © 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 for more information.
php-ecma-intl/test may utilize copyrighted material under license from the following projects:
Please see NOTICE for more information.