From 6aa1ef41e62397b19bd1fe0e3cf4d8403b942f63 Mon Sep 17 00:00:00 2001 From: Vladimir Bryzgalov Date: Fri, 17 Apr 2026 21:53:22 +0500 Subject: [PATCH] chore: add composer + phpunit dev scaffolding Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitattributes | 7 +++++++ composer.json | 23 +++++++++++++++++++++++ phpunit.xml | 12 ++++++++++++ tests/bootstrap.php | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 .gitattributes create mode 100644 composer.json create mode 100644 phpunit.xml create mode 100644 tests/bootstrap.php diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..033ffdd --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +/tests export-ignore +/docs export-ignore +/phpunit.xml export-ignore +/composer.json export-ignore +/composer.lock export-ignore +/.gitignore export-ignore +/.gitattributes export-ignore diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..64c249c --- /dev/null +++ b/composer.json @@ -0,0 +1,23 @@ +{ + "name": "sidelkin/cf7-spam-to-telegram", + "description": "Forwards CF7 spam submissions to Telegram", + "type": "wordpress-plugin", + "license": "GPL-2.0-or-later", + "require": { + "php": ">=7.4" + }, + "require-dev": { + "phpunit/phpunit": "^9.6" + }, + "autoload-dev": { + "psr-4": { + "Cf7stg\\Tests\\": "tests/" + } + }, + "scripts": { + "test": "phpunit" + }, + "config": { + "sort-packages": true + } +} diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..9097b7c --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,12 @@ + + + + + tests + + + diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 0000000..421a14f --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,34 @@ +