PHPackages                             vagrantin/wp-nonce - 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. vagrantin/wp-nonce

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

vagrantin/wp-nonce
==================

Playing and testing Wordpress nonces with phpunit tests

1.1.x-dev(8y ago)022GPLv2.0+PHP

Since May 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Vagrantin/wp_nonces)[ Packagist](https://packagist.org/packages/vagrantin/wp-nonce)[ RSS](/packages/vagrantin-wp-nonce/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

![PHP](https://camo.githubusercontent.com/93f6cd01e88cf862301b97e8951e856daf7d5fdff2ab9feac50f648058e91488/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d76372d626c75652e737667)![MySQL](https://camo.githubusercontent.com/d717a32b1c4ce444cc728a5bcd7b0fce8dcfd7f028fa7b16870b5b2b9089d0b2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d7973716c2d76352e362d626c75652e737667)![PHPUnit](https://camo.githubusercontent.com/e50c3dc4904a8964a1cd9ad58920010fc5d632a521bb76652292ba699a1f1771/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f504850556e69742d76362e312d626c75652e737667)

![Travis](https://camo.githubusercontent.com/e9c964205d309c489a48db62adc88085d2e4fb9443fb7c33ca78e142a41317ef/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275696c642d70617373696e672d627269676874677265656e2e737667)

wp-nonce testing
================

[](#wp-nonce-testing)

**Using WordPressDev Composer Fork**

The purpose of this project is to test and validate Wordpress WP-nonces using phpunit test.
For this purpose I took the party to use WordPress Dev environement to perform those tests.

SETUP
-----

[](#setup)

To install this package we are using composer.

### Composer

[](#composer)

Once you have installed composer following the procedure available [here](https://getcomposer.org/doc/00-intro.md), you can

1. Grab the composer.json from my git repository [wp-nonce-package](https://github.com/Vagrantin/wp_nonce_package), with your prefered methode.
2. Or create a composer.json file in a new project directory and write down manualy those informations:

```
{
  "minimum-stability": "dev",
  "require-dev": {
      "vagrantin/wp-nonce": "^1.0"
  },
  "require": {
  }
}

```

- Now you can run `composer update` this will trigger the install of the package.
- Then you **have** to go to the `vendor/vagrantin/wp-nonce/` directory to perform all the following steps.

**From here we consider that you are in the `vendor/vagrantin/wp-nonce/` directory for all the next steps**

PHPUnit Test
------------

[](#phpunit-test)

- The PHPUnit test files are in the *Test/* folder, named `nonceTest.php`

WP-NONCE
--------

[](#wp-nonce)

- The wp-nonce demo file is in the `src/wp-content/plugins/` folder named `wp_nonce_demo.php`

### Wordpress

[](#wordpress)

- Because those tests are based on Wordpress Dev environement, we have to setup a mysql database, it has to be a new database has those tests are destructive.

1. Setup and create a test Database in mysql.
2. Use wp-tests-config-sample.php to create a wp-tests-config.php file, so Wordpress Dev can access this newly created database.

### Run the Tests

[](#run-the-tests)

- run `phpunit`

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community1

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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 ~0 days

Total

4

Last Release

3279d ago

Major Versions

0.2.x-dev → 1.0.x-dev2017-05-19

### Community

### Embed Badge

![Health badge](/badges/vagrantin-wp-nonce/health.svg)

```
[![Health](https://phpackages.com/badges/vagrantin-wp-nonce/health.svg)](https://phpackages.com/packages/vagrantin-wp-nonce)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M571](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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