php-ds/tests
Test suite and fixtures for php-ds (Data Structures) in PHP. Provides unit tests and supporting files to validate DS extension behavior and ensure stable, consistent functionality across versions and environments.
This package is not meant for end-user application development—it’s a dedicated test suite for the php-ds extension itself. As a developer, you’ll only interact with it if you’re:
php-ds (core extension or wrapper libraries)To begin:
php-ds extension repo (e.g., https://github.com/php-ds/ext-ds) and ensure the php-ds extension is enabled in your php.ini.php-ds/tests and run tests via PHPUnit:
composer install
./vendor/bin/phpunit
tests/Vector/ or tests/Map/ to understand how core structures are validated—these are the most frequently used.Since this is a test suite—not a library—integration isn’t about "using it in your app." Instead, adopt these patterns when developing alongside php-ds:
As a contributor:
tests/{Structure}/ to cover bug fixes, edge cases, or new methods.Vector/emptyTest.php, Map/mergeTest.php).null, arrays, scalar types).As a maintainer:
--group filters to run only relevant tests during development:
./vendor/bin/phpunit --group map
As a library author (e.g., building an ORM over php-ds):
git clone https://github.com/php-ds/tests.git ./vendor/php-ds-tests
./vendor/bin/phpunit ./vendor/php-ds-tests
php-ds—you must clone it separately. It’s not installed via composer require.php-ds versions if run against newer PHP. Always verify your php-ds extension version matches the test suite’s target (check tests/bootstrap.php or phpunit.xml).OPcache enabled—some tests mutate internal states in ways that trip cached bytecode. Use php -d opcache.enable=0.valgrind or phpdbg to detect memory leaks or undefined behavior.tests/Custom/ with your own .test.php files and referencing them in phpunit.xml.How can I help you explore Laravel packages today?