An open API service indexing awesome lists of open source software.

https://github.com/php-forge/support

Support library tests for PHP.
https://github.com/php-forge/support

Last synced: 11 months ago
JSON representation

Support library tests for PHP.

Awesome Lists containing this project

README

          





Support.





PHPUnit


Codecov


Infection


Psalm


Psalm Coverage


Style ci

## Installation

The preferred way to install this extension is through [composer](https://getcomposer.org/download/).

Either run

```shell
composer require --prefer-dist php-forge/support
```

or add

```json
"php-forge/support": "^0.1"
```

to the require-dev section of your `composer.json` file.

## Usage

### Equals without line ending

```php
assertSame('bar', Assert::inaccessibleProperty($object, 'foo'));
```

### Invoke method

```php
assertSame('foo', Assert::invokeMethod($object, 'foo'));
```

### Set inaccessible property

```php
assertSame('baz', Assert::inaccessibleProperty($object, 'foo'));
```

### Remove files from directory

```php
assertFileDoesNotExist($dir . '/test.txt');

rmdir(__DIR__ . '/runtime');
```

## Support versions

[![PHP81](https://img.shields.io/badge/PHP-%3E%3D8.1-787CB5)](https://www.php.net/releases/8.1/en.php)
[![Yii30](https://img.shields.io/badge/Yii%20version-3.0-blue)](https://yiiframework.com)

## Testing

[Check the documentation testing](/docs/testing.md) to learn about testing.

## Our social networks

[![Twitter](https://img.shields.io/badge/twitter-follow-1DA1F2?logo=twitter&logoColor=1DA1F2&labelColor=555555?style=flat)](https://twitter.com/Terabytesoftw)

## License

The MIT License. Please see [License File](LICENSE.md) for more information.