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(7y ago)0199MITPHPPHP &gt;=5.5.9

Since Jul 18Pushed 7y 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 2d 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 37% 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

2915d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/480994b22e2e876ded46337c2248e1808a5dd2e81aff15c0088f0cdca014c038?d=identicon)[dcode](/maintainers/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.5k118.8M754](/packages/brianium-paratest)[ergebnis/phpunit-slow-test-detector

Provides facilities for detecting slow tests in phpunit/phpunit.

1468.1M72](/packages/ergebnis-phpunit-slow-test-detector)[robiningelbrecht/phpunit-pretty-print

Prettify PHPUnit output

76460.0k15](/packages/robiningelbrecht-phpunit-pretty-print)[juampi92/test-seo

Easy way to test your SEO

26341.0k](/packages/juampi92-test-seo)[robiningelbrecht/phpunit-coverage-tools

PHPUnit coverage tools

1783.0k34](/packages/robiningelbrecht-phpunit-coverage-tools)[lastzero/test-tools

Increases testing productivity by adding a service container and self-initializing fakes to PHPUnit

2244.3k13](/packages/lastzero-test-tools)

PHPackages © 2026

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