PHPackages                             scaleupstack/assert - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. scaleupstack/assert

ActiveLibrary[Testing &amp; Quality](/categories/testing)

scaleupstack/assert
===================

A tiny wrapper around webmozart/assert that is easily extendable to throw project-specific assertions.

v1.0.2(6y ago)11.6k4BSD-3-ClausePHPPHP &gt;=7.2.0

Since Feb 16Pushed 6y ago1 watchersCompare

[ Source](https://github.com/scaleupstack/assert)[ Packagist](https://packagist.org/packages/scaleupstack/assert)[ RSS](/packages/scaleupstack-assert/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (4)

ScaleUpStack/Assert
===================

[](#scaleupstackassert)

This library is a tiny wrapper around [webmozart/assert](https://github.com/webmozart/assert), a library that provides "Assertions to validate method input/output with nice error messages". ScaleUpStack/Assert allows you to extend that library easily to throw a project-specific exception in case an assertion is invalid.

The main reason of this library is, that you can extend it in your project without the need to write a unit test to get full code coverage.

The concept how to extend the base class was inspired by [beberlei/assert](https://github.com/beberlei/assert).

Installation
------------

[](#installation)

Use [Composer](https://getcomposer.org) to install this library:

```
$ composer require scaleupstack/assert

```

Usage
-----

[](#usage)

```
