PHPackages                             refaltor/pest-pmmp-tests - 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. refaltor/pest-pmmp-tests

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

refaltor/pest-pmmp-tests
========================

Little library for create unit test in PocketMine with Await Generator.

2.1.0(1y ago)413MITPHP

Since Apr 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Refaltor77/PestPMMP)[ Packagist](https://packagist.org/packages/refaltor/pest-pmmp-tests)[ RSS](/packages/refaltor-pest-pmmp-tests/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (9)Used By (0)

[![Logo](resources/logo.png)](resources/logo.png)

Pest PMMP Tests
===============

[](#pest-pmmp-tests)

[![License](https://camo.githubusercontent.com/bb501cc80163c517fb2069f9e74e3109f72e0d61279239f59be233fca23cb71c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f726566616c746f722f706573742d706d6d702d7465737473)](https://camo.githubusercontent.com/bb501cc80163c517fb2069f9e74e3109f72e0d61279239f59be233fca23cb71c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f726566616c746f722f706573742d706d6d702d7465737473)[![PHP](https://camo.githubusercontent.com/09ae88b42c033bde5122bdad7d366c60ecde07e7f6a544a465c9f88395a8f097/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e332b2d626c7565)](https://camo.githubusercontent.com/09ae88b42c033bde5122bdad7d366c60ecde07e7f6a544a465c9f88395a8f097/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e332b2d626c7565)[![PocketMine-MP](https://camo.githubusercontent.com/17cd9a616d0b189c2bfb4fbf3e7ce694d895118f0d4fb7b9a88c680b3358c255/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f636b65744d696e652d2d4d502d253545352e302e302d626c756576696f6c6574)](https://camo.githubusercontent.com/17cd9a616d0b189c2bfb4fbf3e7ce694d895118f0d4fb7b9a88c680b3358c255/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506f636b65744d696e652d2d4d502d253545352e302e302d626c756576696f6c6574)[![Await Generator](https://camo.githubusercontent.com/c4a93debface335c48ab0d9d21576d8a2ad0bca6f11a17c69b8db53bc0e290a8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f41776169742d2d47656e657261746f722d253545332e362d6f72616e6765)](https://camo.githubusercontent.com/c4a93debface335c48ab0d9d21576d8a2ad0bca6f11a17c69b8db53bc0e290a8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f41776169742d2d47656e657261746f722d253545332e362d6f72616e6765)

> **Simple &amp; elegant** unit testing for PocketMine-MP inspired by [Pest](https://pestphp.com) and powered [Await Generator](https://github.com/SOFe/await-generator).

📦 Installation
--------------

[](#-installation)

```
composer require refaltor/pest-pmmp-tests
```

📦 Simple Usage
--------------

[](#-simple-usage)

> In your PocketMine plugin, you can easily integrate this unit testing library and run it either through a command or directly in onEnable — it’s totally up to you.

```
 public function onEnable(): void
 {
     # tester load
     PocketMineTester::initPlugin($this);
     PocketMineTester::launchTest(__DIR__ . '/tests', "core\\tests\\");
 }
```

#### Project Structure Example :

[](#project-structure-example-)

```
my-plugin/
├── src/
│   └── core/
│       └── Main.php
├── tests/
│   └── MyFirstTest.php
├── plugin.yml
├── composer.json
└── README.md

```

📦 Test Example
--------------

[](#-test-example)

> Note: For your tests to run, your .php file must end with ...Test.php, and all the functions within that file must end with ...test().

```
