{"id":20674627,"url":"https://github.com/mehralsnix/assumptions","last_synced_at":"2025-04-19T20:26:58.133Z","repository":{"id":32045956,"uuid":"35617500","full_name":"MehrAlsNix/Assumptions","owner":"MehrAlsNix","description":"Assumptions can be used to skip tests when common preconditions, like the PHP Version or installed extensions, are not met.","archived":false,"fork":false,"pushed_at":"2018-02-12T22:10:15.000Z","size":114,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-29T12:51:26.405Z","etag":null,"topics":["phpunit","testing"],"latest_commit_sha":null,"homepage":"http://mehralsnix.github.io/Assumptions","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/MehrAlsNix.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":"2015-05-14T14:59:24.000Z","updated_at":"2017-12-29T23:17:38.000Z","dependencies_parsed_at":"2022-08-24T15:41:22.503Z","dependency_job_id":null,"html_url":"https://github.com/MehrAlsNix/Assumptions","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehrAlsNix%2FAssumptions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehrAlsNix%2FAssumptions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehrAlsNix%2FAssumptions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MehrAlsNix%2FAssumptions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MehrAlsNix","download_url":"https://codeload.github.com/MehrAlsNix/Assumptions/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249793889,"owners_count":21326624,"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":["phpunit","testing"],"created_at":"2024-11-16T21:06:29.306Z","updated_at":"2025-04-19T20:26:58.112Z","avatar_url":"https://github.com/MehrAlsNix.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Assumptions (not only) for PHPUnit.\n\n[![Build Status](https://travis-ci.org/MehrAlsNix/Assumptions.svg?branch=develop)](https://travis-ci.org/MehrAlsNix/Assumptions) [![Code Climate](https://codeclimate.com/github/MehrAlsNix/Assumptions/badges/gpa.svg)](https://codeclimate.com/github/MehrAlsNix/Assumptions) [![Test Coverage](https://codeclimate.com/github/MehrAlsNix/Assumptions/badges/coverage.svg)](https://codeclimate.com/github/MehrAlsNix/Assumptions/coverage) [![Dependency Status](https://www.versioneye.com/user/projects/5558aa6eb2ff6d2ecc000368/badge.svg?style=flat)](https://www.versioneye.com/user/projects/5558aa6eb2ff6d2ecc000368)\n[![Latest Stable Version](https://poser.pugx.org/mehr-als-nix/assumptions/v/stable)](https://packagist.org/packages/mehr-als-nix/assumptions) [![Latest Unstable Version](https://poser.pugx.org/mehr-als-nix/assumptions/v/unstable)](https://packagist.org/packages/mehr-als-nix/assumptions) [![License](https://poser.pugx.org/mehr-als-nix/assumptions/license)](https://packagist.org/packages/mehr-als-nix/assumptions) [![Total Downloads](https://poser.pugx.org/mehr-als-nix/assumptions/downloads)](https://packagist.org/packages/mehr-als-nix/assumptions)\n[![Build status](https://ci.appveyor.com/api/projects/status/xqcdrl8b62d6qrle/branch/develop?svg=true)](https://ci.appveyor.com/project/siad007/assumptions/branch/develop)\n\n## Introduction\n\nAssumptions can be used to skip tests when common preconditions, like the PHP Version or installed extensions, are not met.\n\nThe default PHPUnit runner treats tests with failing assumptions as skipped. Custom runners may behave differently.\n\nWe have included several assumptions like `assumeTrue`, `assumeExtensionLoaded`,... by default. All of those functions are subsumed in assumeThat, with the appropriate `Hamcrest` matcher.\n\nA failing assumption in a `@before` or `@beforeClass` method will have the same effect as a failing assumption in each `@test` method of the class.\n\n***\n\nThe concept behind **Assumptions for PHPUnit** is based on the adequate junit feature, which is documented on their [wiki - Assumptions with assume](https://github.com/junit-team/junit/wiki/Assumptions-with-assume)\n\n## Note\n\nThere is a similar feature in PHPUnit called [@requires](https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.requires)!\n\nIf you are familiar in using `@requires` annotation to dedicate that a given [requirement](https://phpunit.de/manual/current/en/incomplete-and-skipped-tests.html#incomplete-and-skipped-tests.requires.tables.api) would be given and you are happy about, then you just do not need the use of **Assumption for PHPUnit**.\n\nBut if you want to have\n- code completion\n- better readability\n- finer control\n- more requirement abilities\n\nthen you should give **Assumption for PHPUnit** a try.\n\n\u003chr\u003e\n\n## Requirements\n\n- PHP \u003e= 7.1\n\nif you are looking for a version which supports PHP \u003c 7.0.7 just use the v2.0.0\n\n## Installation\n\n[see wiki:installation](https://github.com/MehrAlsNix/Assumptions/wiki/1.-Installation)\n\n## Assumptions\n\n[see wiki:assumptions](https://github.com/MehrAlsNix/Assumptions/wiki/2.-Assumptions)\n\n## Examples\n\n[see wiki:examples](https://github.com/MehrAlsNix/Assumptions/wiki/3.-Examples)\n\n## ResultPrinter\n\n[see wiki:result-printer](https://github.com/MehrAlsNix/Assumptions/wiki/4.-ResultPrinter)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehralsnix%2Fassumptions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehralsnix%2Fassumptions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehralsnix%2Fassumptions/lists"}