PHPackages                             ssaweb/appwrite-test-utils - 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. ssaweb/appwrite-test-utils

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

ssaweb/appwrite-test-utils
==========================

Helpful classes to write your PHPUnit tests for Appwrite functions

v2.0.2(2y ago)1666MITPHP

Since Jun 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ssa-web-solutions/appwrite-test-utils)[ Packagist](https://packagist.org/packages/ssaweb/appwrite-test-utils)[ RSS](/packages/ssaweb-appwrite-test-utils/feed)WikiDiscussions main Synced today

READMEChangelog (5)DependenciesVersions (6)Used By (0)

appwrite-test-utils
===================

[](#appwrite-test-utils)

Classes to help you writing your PHPUnit tests for Appwrite functions

### Why use a $context wrapper?

[](#why-use-a-context-wrapper)

Personal needs that may be useful to someone else XD

Basically if you try to write a test to check the data sent to the **json** or **send** methods of Appwrite Functions' API like below:

```
$this->response = $this->createMock(stdClass::class);

$this->response
    ->expects($this->once())
    ->method('json')
    ->with($this->anything(), 201);
```

The code above will fail with the following message:

```
Trying to configure method "json" which cannot be configured because it does not exist, has not been specified, is final, or is static

```

Therefore, we need to add a type to that object, since Appwrite's SDK does not provide it to us, I've created this package to do so.

```
$this->response = $this->createMock(Response::class);

$this->response
    ->expects($this->once())
    ->method('json')
    ->with($this->anything(), 201);
```

now we've a typed $response object that can be evaluated =)

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~48 days

Total

5

Last Release

908d ago

Major Versions

v1.1.0 → v2.0.02024-01-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/cac6ff1f52ea078adb7daf8bef160f59cb0661a6cb26dc2341e53653a083a339?d=identicon)[lucasctd](/maintainers/lucasctd)

---

Top Contributors

[![lucasctd](https://avatars.githubusercontent.com/u/5876679?v=4)](https://github.com/lucasctd "lucasctd (10 commits)")

### Embed Badge

![Health badge](/badges/ssaweb-appwrite-test-utils/health.svg)

```
[![Health](https://phpackages.com/badges/ssaweb-appwrite-test-utils/health.svg)](https://phpackages.com/packages/ssaweb-appwrite-test-utils)
```

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14429.2M361](/packages/dms-phpunit-arraysubset-asserts)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
