PHPackages                             dcodeteam/phpunit-for-bitrix - 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. dcodeteam/phpunit-for-bitrix

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

dcodeteam/phpunit-for-bitrix
============================

Based on https://github.com/osotov/phpunit-for-bitrix. Base test class for unit tests inside 1C-Bitrix framework environment

v0.2.2(8y ago)0199MITPHPPHP &gt;=5.5.9

Since Jul 18Pushed 8y ago1 watchersCompare

[ Source](https://github.com/dcodeteam/phpunit-for-bitrix)[ Packagist](https://packagist.org/packages/dcodeteam/phpunit-for-bitrix)[ Docs](https://github.com/dcodeteam/phpunit-for-bitrix)[ RSS](/packages/dcodeteam-phpunit-for-bitrix/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (3)Versions (5)Used By (0)

phpunit-for-bitrix
==================

[](#phpunit-for-bitrix)

Based on [osotov/phpunit-for-bitrix](https://github.com/osotov/phpunit-for-bitrix).

Base test class for unit tests inside 1C-Bitrix framework environment

note
----

[](#note)

This package requires latest versions of php (&gt;= 5.5.9) and phpunit (&gt;=4.7.0 &lt;7.0.0)

It might work fine with latest versions (7+) but was tested only with phpunit ^6 (*6.5.8*).

installation
------------

[](#installation)

To install package, run the command below and you will get the latest version

```
composer require dcodeteam/phpunit-for-bitrix
```

Copy phpunit.xml.dist file from package to document root. Set up your tests directory inside tag. If you want to use another bootstrap file set it instead default inside bootstrap attribute.

usage
-----

[](#usage)

If you use *old phpunit* (&gt;5.0.0) extend `Dcode\Bitrix\TestCase` class in your test cases.

This class uses mock framework Mockery to ease mock and stub creation and it uses Faker to help you with creation of dummy data.

For new php unit (&gt;=5.0.0) use `\PHPUnit\Framework\TestCase`.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.9% 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 ~346 days

Total

4

Last Release

3007d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/171574?v=4)[Derek Ditch](/maintainers/dcode)[@dcode](https://github.com/dcode)

---

Top Contributors

[![Alegzander](https://avatars.githubusercontent.com/u/2426298?v=4)](https://github.com/Alegzander "Alegzander (10 commits)")[![osotov](https://avatars.githubusercontent.com/u/3656517?v=4)](https://github.com/osotov "osotov (3 commits)")

---

Tags

phpunitbitrix

### Embed Badge

![Health badge](/badges/dcodeteam-phpunit-for-bitrix/health.svg)

```
[![Health](https://phpackages.com/badges/dcodeteam-phpunit-for-bitrix/health.svg)](https://phpackages.com/packages/dcodeteam-phpunit-for-bitrix)
```

###  Alternatives

[brianium/paratest

Parallel testing for PHP

2.5k142.8M1.1k](/packages/brianium-paratest)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k43.6M45.4k](/packages/orchestra-testbench)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2023.2M366](/packages/drupal-core-dev)

PHPackages © 2026

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