PHPackages                             ixis/codeception-drupal-variable - 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. ixis/codeception-drupal-variable

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

ixis/codeception-drupal-variable
================================

A Codeception module to allow Drupal variables to be tested and set during tests

0.3.3(10y ago)06.2k21MITPHP

Since Aug 27Pushed 10y ago2 watchersCompare

[ Source](https://github.com/ixis/codeception-drupal-variable)[ Packagist](https://packagist.org/packages/ixis/codeception-drupal-variable)[ Docs](https://github.com/ixis/codeception-drupal-variable)[ RSS](/packages/ixis-codeception-drupal-variable/feed)WikiDiscussions develop Synced 2d ago

READMEChangelog (1)DependenciesVersions (8)Used By (1)

\#Drupal Variable

Codeception module to allow testing of drupal variables.

e.g.

```
// Assert that the target site has variable "clean_url" set to 1
$I->seeVariable("clean_url", 1);

// Set a variable.
$I->haveVariable("clean_url", 0);

// Delete a variable.
$I->dontHaveVariable("clean_url");

// Retrieve a variable value.
$value = $I->getVariable("clean_url");
```

There are three ways of accessing the variable values.

- Bootstrapped - bootstrap the locally installed drupal instance and use variable\_get/set().
- DirectConnection - use PDO to query the database directly.
- Drush - use drush to get/set variables.

\#Install

Install using composer, using git repository (for now).

```
"require": {
    "ixis/codeception-drupal-variable": "~0.3"
}

```

\#Configure

Add 'DrupalVariable' module to the suite configuration.

```
class_name: AcceptanceTester
modules:
    enabled:
        - DrupalVariable

```

\##Bootstrapped

```
DrupalVariable:
  class: Codeception\Module\Drupal\Variable\VariableStorage\Bootstrapped
```

Required config variables:

- `drupal_root`. This is the path the local instance of the drupal site you wish to set/get variables on.
    - e.g. `/home/sites/www.example.com`

\##Direct connection to database

```
DrupalVariable:
  class: Codeception\Module\Drupal\Variable\VariableStorage\DirectConnection
```

Required config variables:

- `dsn` - dsn to the instance of the drupal site db.
    - e.g. `mysql:host=localhost;dbname=drupal`
- `user` - the db user
- `password` - the db password

\##Drush

```
DrupalVariable:
  class: Codeception\Module\Drupal\Variable\VariableStorage\Drush
```

Required config variables:

- `drush_alias` - the drush alias to the site under test.
    - e.g. `@mysite.local`

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.7% 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 ~117 days

Recently: every ~146 days

Total

6

Last Release

3741d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/216767?v=4)[Paul Byrne](/maintainers/pfaocle)[@pfaocle](https://github.com/pfaocle)

![](https://www.gravatar.com/avatar/79d2dd7d81f5d08fdbcc0ca820065de4d51933cdf50e941e9f5faa130d5c3f44?d=identicon)[andyr](/maintainers/andyr)

---

Top Contributors

[![ixisandyr](https://avatars.githubusercontent.com/u/5859244?v=4)](https://github.com/ixisandyr "ixisandyr (22 commits)")[![PJnes](https://avatars.githubusercontent.com/u/5631?v=4)](https://github.com/PJnes "PJnes (1 commits)")

### Embed Badge

![Health badge](/badges/ixis-codeception-drupal-variable/health.svg)

```
[![Health](https://phpackages.com/badges/ixis-codeception-drupal-variable/health.svg)](https://phpackages.com/packages/ixis-codeception-drupal-variable)
```

###  Alternatives

[dms/phpunit-arraysubset-asserts

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

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

PHPackages © 2026

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