2017 © Pedro Peláez
 

library mocks-drupal-variables

Mock for drupal variable functions variable_(set,get,del)

image

sikofitt/mocks-drupal-variables

Mock for drupal variable functions variable_(set,get,del)

  • Monday, August 8, 2016
  • by sikofitt
  • Repository
  • 1 Watchers
  • 0 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Drupal Variable Mock Build Status

Mocks for drupal variable functions variable_(set,get,del) for testing outside of Drupal, (*1)

Versions

Drupal 7.x, (*2)

Usage

composer require sikofitt/mocks-drupal-variables, (*3)

require 'vendor/autoload.php', (*4)

Then just use as if you were in drupal., (*5)

variable_set('myvar', 'myvalue');
variable_get('myvar'); // myvalue
variable_del('myvar');
variable_get('myvar', 'default_if_not_found'); // default_if_not_found

Just like drupal, every function returns null, except variable_get. But variable_get will return null if the value is not found and no default was given., (*6)

Requirements

PHP >=5.3, (*7)

Tests

phpunit, (*8)

The Versions

08/08 2016

v1.0.x-dev

1.0.9999999.9999999-dev

Mock for drupal variable functions variable_(set,get,del)

  Sources   Download

GPL-3.0

The Requires

  • php >=5.3

 

The Development Requires

by Avatar sikofitt

mock config drupal

08/08 2016

dev-master

9999999-dev

Mock for drupal variable functions variable_(set,get,del)

  Sources   Download

GPL-3.0

The Requires

  • php >=5.3

 

The Development Requires

by Avatar sikofitt

mock config drupal

08/08 2016

v1.0.3

1.0.3.0

Mock for drupal variable functions variable_(set,get,del)

  Sources   Download

GPL-3.0

The Requires

  • php >=5.3

 

The Development Requires

by Avatar sikofitt

mock config drupal