Skip to content

Commit 6126c5e

Browse files
committed
updates adding tests in and updating readme/composer file
1 parent 4a39ba3 commit 6126c5e

7 files changed

Lines changed: 1053 additions & 21 deletions

File tree

.github/workflows/tests.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
php-version: ['8.2', '8.3', '8.4']
16+
17+
name: PHP ${{ matrix.php-version }}
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Setup PHP
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: ${{ matrix.php-version }}
27+
extensions: soap
28+
coverage: none
29+
30+
- name: Install dependencies
31+
run: composer install --prefer-dist --no-progress --no-interaction
32+
33+
- name: Run tests
34+
run: vendor/bin/phpunit

README.md

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,40 @@
1-
# Licenses Module for MyAdmin
1+
# MyAdmin Licenses Module
22

3-
Licenses Module for MyAdmin
3+
[![Tests](https://github.com/detain/myadmin-licenses-module/actions/workflows/tests.yml/badge.svg)](https://github.com/detain/myadmin-licenses-module/actions/workflows/tests.yml)
4+
[![Latest Stable Version](https://poser.pugx.org/detain/myadmin-licenses-module/version)](https://packagist.org/packages/detain/myadmin-licenses-module)
5+
[![Total Downloads](https://poser.pugx.org/detain/myadmin-licenses-module/downloads)](https://packagist.org/packages/detain/myadmin-licenses-module)
6+
[![License](https://poser.pugx.org/detain/myadmin-licenses-module/license)](https://packagist.org/packages/detain/myadmin-licenses-module)
47

5-
## Build Status and Code Analysis
8+
A plugin module for the MyAdmin administration panel that provides software license management capabilities. It handles the full license lifecycle including purchasing, IP assignment, IP changes, cancellation, and integration with the billing and invoicing system. The module registers as an event-driven plugin through the Symfony EventDispatcher, exposing a SOAP/REST API for programmatic license operations.
69

7-
Site | Status
8-
--------------|---------------------------
9-
![Travis-CI](http://i.is.cc/storage/GYd75qN.png "Travis-CI") | [![Build Status](https://travis-ci.org/detain/myadmin-licenses-module.svg?branch=master)](https://travis-ci.org/detain/myadmin-licenses-module)
10-
![CodeClimate](http://i.is.cc/storage/GYlageh.png "CodeClimate") | [![Code Climate](https://codeclimate.com/github/detain/myadmin-licenses-module/badges/gpa.svg)](https://codeclimate.com/github/detain/myadmin-licenses-module) [![Test Coverage](https://codeclimate.com/github/detain/myadmin-licenses-module/badges/coverage.svg)](https://codeclimate.com/github/detain/myadmin-licenses-module/coverage) [![Issue Count](https://codeclimate.com/github/detain/myadmin-licenses-module/badges/issue_count.svg)](https://codeclimate.com/github/detain/myadmin-licenses-module)
11-
![Scrutinizer](http://i.is.cc/storage/GYeUnux.png "Scrutinizer") | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/myadmin-plugins/licenses-module/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/myadmin-plugins/licenses-module/?branch=master) [![Code Coverage](https://scrutinizer-ci.com/g/myadmin-plugins/licenses-module/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/myadmin-plugins/licenses-module/?branch=master) [![Build Status](https://scrutinizer-ci.com/g/myadmin-plugins/licenses-module/badges/build.png?b=master)](https://scrutinizer-ci.com/g/myadmin-plugins/licenses-module/build-status/master)
12-
![Codacy](http://i.is.cc/storage/GYi66Cx.png "Codacy") | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/226251fc068f4fd5b4b4ef9a40011d06)](https://www.codacy.com/app/detain/myadmin-licenses-module) [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/25fa74eb74c947bf969602fcfe87e349)](https://www.codacy.com/app/detain/myadmin-licenses-module?utm_source=github.com&utm_medium=referral&utm_content=detain/myadmin-licenses-module&utm_campaign=Badge_Coverage)
13-
![Coveralls](http://i.is.cc/storage/GYjNSim.png "Coveralls") | [![Coverage Status](https://coveralls.io/repos/github/detain/db_abstraction/badge.svg?branch=master)](https://coveralls.io/github/detain/myadmin-licenses-module?branch=master)
14-
![Packagist](http://i.is.cc/storage/GYacBEX.png "Packagist") | [![Latest Stable Version](https://poser.pugx.org/detain/myadmin-licenses-module/version)](https://packagist.org/packages/detain/myadmin-licenses-module) [![Total Downloads](https://poser.pugx.org/detain/myadmin-licenses-module/downloads)](https://packagist.org/packages/detain/myadmin-licenses-module) [![Latest Unstable Version](https://poser.pugx.org/detain/myadmin-licenses-module/v/unstable)](//packagist.org/packages/detain/myadmin-licenses-module) [![Monthly Downloads](https://poser.pugx.org/detain/myadmin-licenses-module/d/monthly)](https://packagist.org/packages/detain/myadmin-licenses-module) [![Daily Downloads](https://poser.pugx.org/detain/myadmin-licenses-module/d/daily)](https://packagist.org/packages/detain/myadmin-licenses-module) [![License](https://poser.pugx.org/detain/myadmin-licenses-module/license)](https://packagist.org/packages/detain/myadmin-licenses-module)
10+
## Features
1511

12+
- License purchasing with coupon and prepay support
13+
- IP-based license assignment and IP change management
14+
- License cancellation by IP or by license ID
15+
- Automatic integration with the MyAdmin billing and invoicing system
16+
- Event-driven architecture using Symfony EventDispatcher
17+
- Configurable suspend, deletion, and billing parameters
1618

1719
## Installation
1820

19-
Install with composer like
20-
2121
```sh
2222
composer require detain/myadmin-licenses-module
2323
```
2424

25-
## License
25+
## Requirements
26+
27+
- PHP >= 5.0
28+
- ext-soap
29+
- symfony/event-dispatcher ^5.0
30+
31+
## Testing
2632

27-
The Licenses Module for MyAdmin class is licensed under the LGPL-v2.1 license.
33+
```sh
34+
composer install
35+
vendor/bin/phpunit
36+
```
37+
38+
## License
2839

40+
This package is licensed under the [LGPL-2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html) license.

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@
2525
"detain/myadmin-plugin-installer": "dev-master"
2626
},
2727
"require-dev": {
28-
"phpunit/phpunit": "*",
29-
"phpunit/phpunit-mock-objects": "*",
30-
"vlucas/phpdotenv": "*",
31-
"codeclimate/php-test-reporter": "dev-master",
32-
"satooshi/php-coveralls": "*",
33-
"codacy/coverage": "dev-master"
28+
"phpunit/phpunit": "^9.6"
3429
},
3530
"autoload": {
3631
"psr-4": {
3732
"Detain\\MyAdminLicenses\\": "src/"
3833
}
34+
},
35+
"autoload-dev": {
36+
"psr-4": {
37+
"Detain\\MyAdminLicenses\\Tests\\": "tests/"
38+
}
3939
}
4040
}

phpunit.xml.dist

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
bootstrap="tests/bootstrap.php"
5+
colors="true"
6+
verbose="true"
7+
failOnRisky="true"
8+
failOnWarning="true"
9+
beStrictAboutOutputDuringTests="true"
10+
beStrictAboutTodoAnnotatedTests="true">
11+
<testsuites>
12+
<testsuite name="unit">
13+
<directory>tests</directory>
14+
</testsuite>
15+
</testsuites>
16+
<coverage processUncoveredFiles="true">
17+
<include>
18+
<directory suffix=".php">src</directory>
19+
</include>
20+
</coverage>
21+
</phpunit>

0 commit comments

Comments
 (0)