2017 © Pedro Peláez
 

library warp

A passthrough to WordPress, used to enable unit testing.

image

loresjoberg/warp

A passthrough to WordPress, used to enable unit testing.

  • Monday, July 23, 2018
  • by loresjoberg
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Warp

Here's why this class exists: WordPress pollutes the global namespace something awful, and there's nothing we can do about that., (*1)

However, we can voluntarily "wrap" WordPress in a class, and choose to only access it through that class. Why would we want to do that? The main reason is unit testing. By accessing WordPress's global functions only through this class, we can easily mock it up and test without instantiating all of WordPress, setting up a database, so on and so forth., (*2)

Installation

Install using [Composer][composer]:, (*3)

    composer require loresjoberg/warp

Usage

$warp = new \LoreSjoberg\Warp();, (*4)

$result = $warp->count_users();, (*5)

The Versions

23/07 2018

v1.0.x-dev

1.0.9999999.9999999-dev

A passthrough to WordPress, used to enable unit testing.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Lore Sjoberg

23/07 2018

dev-master

9999999-dev

A passthrough to WordPress, used to enable unit testing.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Lore Sjoberg

23/07 2018

v1.0.1

1.0.1.0

A passthrough to WordPress, used to enable unit testing.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Lore Sjoberg

23/07 2018

v1.0.0.x-dev

1.0.0.9999999-dev

A passthrough to WordPress, used to enable unit testing.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Lore Sjoberg

23/07 2018

v1.0.0

1.0.0.0

A passthrough to WordPress, used to enable unit testing.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Lore Sjoberg