{"id":18594458,"url":"https://github.com/bauhausphp/dbasserture","last_synced_at":"2026-02-24T00:06:23.143Z","repository":{"id":34053039,"uuid":"167081740","full_name":"bauhausphp/dbasserture","owner":"bauhausphp","description":"Tool for setting up and asserting database in feature and integration tests","archived":false,"fork":false,"pushed_at":"2022-06-20T19:03:06.000Z","size":121,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-27T14:40:19.453Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/bauhausphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-22T23:10:55.000Z","updated_at":"2025-05-16T21:09:55.000Z","dependencies_parsed_at":"2022-09-21T11:11:20.204Z","dependency_job_id":null,"html_url":"https://github.com/bauhausphp/dbasserture","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/bauhausphp/dbasserture","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bauhausphp%2Fdbasserture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bauhausphp%2Fdbasserture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bauhausphp%2Fdbasserture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bauhausphp%2Fdbasserture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bauhausphp","download_url":"https://codeload.github.com/bauhausphp/dbasserture/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bauhausphp%2Fdbasserture/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29762001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T21:02:23.375Z","status":"ssl_error","status_checked_at":"2026-02-23T20:58:31.539Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-07T01:15:38.174Z","updated_at":"2026-02-24T00:06:23.128Z","avatar_url":"https://github.com/bauhausphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://img.shields.io/github/workflow/status/bauhausphp/dbasserture/Build?style=flat-square)](https://github.com/bauhausphp/dbasserture/actions?query=workflow%3ABuild)\n[![Coverage](https://img.shields.io/codecov/c/github/bauhausphp/dbasserture?style=flat-square)](https://codecov.io/gh/bauhausphp/dbasserture)\n\n[![Stable Version](https://img.shields.io/packagist/v/bauhaus/dbasserture?style=flat-square)](https://packagist.org/packages/bauhaus/dbasserture)\n[![Downloads](https://img.shields.io/packagist/dt/bauhaus/dbasserture?style=flat-square)](https://packagist.org/packages/bauhaus/dbasserture)\n[![PHP Version](https://img.shields.io/packagist/php-v/bauhaus/dbasserture?style=flat-square)](composer.json)\n[![License](https://img.shields.io/github/license/bauhausphp/dbasserture?style=flat-square)](LICENSE)\n\n# DB Asserture\n\nThis tool aims to help the DB setup and assertion in a integration tests\ncontext.\n\n```php\nuse Bauhaus\\DbAsserture\\DbAssertureFactory;\n\n$factory = new DbAssertureFactory();\n$dbAsserture = $factory-\u003efromDsn('mysql://user:pass@host:port/dbname');\n\n// Clean tables\n$dbAsserture-\u003eclean('table_name', 'another_table_name');\n\n// Insert registers\n$dbAsserture-\u003einsert('table_name', ['id' =\u003e 1, 'name' =\u003e 'Name']);\n$dbAsserture-\u003einsert('table_name',\n    ['id' =\u003e 1, 'name' =\u003e 'Name'],\n    ['id' =\u003e 2, 'name' =\u003e 'Another name'],\n);\n\n// Select registers\n$dbAsserture-\u003eselect('table_name', ['name' =\u003e 'John']); // return many registers with all fields matching provided filter\n$dbAsserture-\u003eselectOne('table_name', ['id' =\u003e 1]); // return one register with all fields matching provided filters\n\n// Assert if is registered in database\n$dbAsserture-\u003eassertOneIsRegistered('table_name', ['id' =\u003e 1, 'name' =\u003e 'Name']); // return true or throw exception\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbauhausphp%2Fdbasserture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbauhausphp%2Fdbasserture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbauhausphp%2Fdbasserture/lists"}