PHPackages                             greys/wc-smart-coupons-tests - 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. greys/wc-smart-coupons-tests

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

greys/wc-smart-coupons-tests
============================

PHPUnit testing framework for WooCommerce Smart Coupons

1.0.0(7mo ago)00MITPHPPHP &gt;=7.4

Since Oct 4Pushed 7mo agoCompare

[ Source](https://github.com/jgreys/wc-smart-coupons-tests)[ Packagist](https://packagist.org/packages/greys/wc-smart-coupons-tests)[ RSS](/packages/greys-wc-smart-coupons-tests/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

WooCommerce Smart Coupons PHPUnit Framework
===========================================

[](#woocommerce-smart-coupons-phpunit-framework)

A comprehensive PHPUnit testing framework for WooCommerce Smart Coupons extensions. This package provides helper classes, mock objects, and custom assertions to make testing Smart Coupons functionality easier and more reliable.

Features
--------

[](#features)

- **Base Test Case**: Specialized `UnitTestCase` with Smart Coupons-specific setup
- **Helper Classes**: Create store credit, gift cards, combination coupons, and more
- **Mock Objects**: Test without requiring the full Smart Coupons plugin
- **Custom Assertions**: Domain-specific assertions for coupon testing
- **Realistic Test Data**: Examples using production-like data patterns

Installation
------------

[](#installation)

```
composer require --dev greys/woocommerce-smart-coupons-phpunit-framework
```

Requirements
------------

[](#requirements)

- PHP 7.4 or higher
- PHPUnit 9.x
- WooCommerce
- `greys/woocommerce-phpunit-framework`

Quick Start
-----------

[](#quick-start)

### 1. Extend the Base Test Case

[](#1-extend-the-base-test-case)

```
