{"id":19184797,"url":"https://github.com/traviscarden/behat-table-comparison","last_synced_at":"2025-05-08T00:04:18.363Z","repository":{"id":38708288,"uuid":"80031514","full_name":"TravisCarden/behat-table-comparison","owner":"TravisCarden","description":"Provides an equality assertion for Behat TableNodes.","archived":false,"fork":false,"pushed_at":"2022-06-23T14:48:14.000Z","size":285,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-05-08T00:04:05.740Z","etag":null,"topics":["behat","gherkin"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/traviscarden/behat-table-comparison","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TravisCarden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-25T16:14:36.000Z","updated_at":"2022-06-23T14:42:49.000Z","dependencies_parsed_at":"2022-09-16T11:23:28.036Z","dependency_job_id":null,"html_url":"https://github.com/TravisCarden/behat-table-comparison","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TravisCarden%2Fbehat-table-comparison","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TravisCarden%2Fbehat-table-comparison/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TravisCarden%2Fbehat-table-comparison/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TravisCarden%2Fbehat-table-comparison/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TravisCarden","download_url":"https://codeload.github.com/TravisCarden/behat-table-comparison/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252973682,"owners_count":21834107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["behat","gherkin"],"created_at":"2024-11-09T11:08:16.972Z","updated_at":"2025-05-08T00:04:18.336Z","avatar_url":"https://github.com/TravisCarden.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Behat Table Comparison\n\n[![Packagist](https://img.shields.io/packagist/v/traviscarden/behat-table-comparison.svg)](https://packagist.org/packages/traviscarden/behat-table-comparison)\n[![Build Status](https://travis-ci.org/TravisCarden/behat-table-comparison.svg?branch=develop)](https://travis-ci.org/TravisCarden/behat-table-comparison)\n[![Coverage Status](https://coveralls.io/repos/github/TravisCarden/behat-table-comparison/badge.svg?branch=master)](https://coveralls.io/github/TravisCarden/behat-table-comparison?branch=master)\n\nThe Behat Table Comparison library provides an equality assertion for comparing Behat `TableNode` tables.\n\n## Installation \u0026 Usage\n\nInstall the library via [Composer](https://getcomposer.org/):\n\n```bash\ncomposer require --dev traviscarden/behat-table-comparison\n```\n\nThen use the [`TableEqualityAssertion`](src/BehatTableComparison/TableEqualityAssertion.php) class in your [`FeatureContext` class](http://docs.behat.org/en/v2.5/guides/4.context.html):\n\n```php\n\u003c?php\n\nuse Behat\\Behat\\Context\\Context;\nuse Behat\\Gherkin\\Node\\TableNode;\nuse TravisCarden\\BehatTableComparison\\TableEqualityAssertion;\n\nclass FeatureContext implements Context\n{\n\n    /**\n     * @Then I should include the following characters in the Company of the Ring\n     */\n    public function iShouldIncludeTheFollowingCharactersInTheCompanyOfTheRing(TableNode $expected)\n    {\n        // Get the data from the application and create a table from it.\n        $application_data = [\n            ['Frodo Baggins', 'Hobbit'],\n            ['Samwise \"Sam\" Gamgee', 'Hobbit'],\n            ['Saruman the White', 'Wizard'],\n            ['Legolas', 'Elf'],\n            ['Gimli', 'Dwarf'],\n            ['Aragorn (Strider)', 'Man'],\n            ['Boromir', 'Man'],\n            ['Meriadoc \"Merry\" Brandybuck', 'Hobbit'],\n            ['Peregrin \"Pippin\" Took', 'Hobbit'],\n        ];\n        $actual = new TableNode($application_data);\n\n        // Build and execute assertion.\n        (new TableEqualityAssertion($expected, $actual))\n            -\u003eexpectHeader(['name', 'race'])\n            -\u003eignoreRowOrder()\n            -\u003esetMissingRowsLabel('Missing characters')\n            -\u003esetUnexpectedRowsLabel('Unexpected characters')\n            -\u003eassert();\n    }\n\n}\n```\n\nOutput is like the following:\n\n![Example Output](resources/example-output.gif)\n\n## Examples\n\nSee [`features/bootstrap/FeatureContext.php`](features/bootstrap/FeatureContext.php) and [`features/examples.feature`](features/examples.feature) for more examples.\n\n## Limitations \u0026 Known Issues\n\nSome inequality detection currently works but does not yet display a helpful error message, because it has not been decided what it should show. Please help me [specify error messages for complex differences](https://github.com/TravisCarden/behat-table-comparison/issues/1).\n\n## Contribution\n\nAll contributions are welcome according to [normal open source practice](https://opensource.guide/how-to-contribute/#how-to-submit-a-contribution).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraviscarden%2Fbehat-table-comparison","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftraviscarden%2Fbehat-table-comparison","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraviscarden%2Fbehat-table-comparison/lists"}