Skip to content

Commit

Permalink
Update composer configuration for beta stability and testing scripts
Browse files Browse the repository at this point in the history
- Change minimum stability from "stable" to "beta" to allow installation of beta packages.
- Add PHPUnit test scripts to facilitate running tests:
  - `test` to run all tests
  - `test-unit` to run only unit tests
  - `test-feature` to run feature tests
- Include a link to the package documentation in the "extra" section of composer.json.
- Update PHPUnit reference in composer.lock for the latest commit.

Changes:
- composer.json:
  - minimum-stability: "stable" to "beta"
  - Added scripts section with test commands
  - Added extra section with readme link
- composer.lock:
  - Updated content-hash
  - Updated PHPUnit package reference and timestamp
  • Loading branch information
shahmal1yev committed May 20, 2024
1 parent e741157 commit 0eb5078
Show file tree
Hide file tree
Showing 54 changed files with 91 additions and 84 deletions.
10 changes: 9 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,21 @@
"email": "[email protected]"
}
],
"minimum-stability": "stable",
"minimum-stability": "beta",
"require": {
"php": ">=8.3",
"ext-curl": "*",
"ext-http": "*"
},
"require-dev": {
"phpunit/phpunit": "^11.0@dev"
},
"scripts": {
"test": "vendor/bin/phpunit",
"test-unit": "vendor/bin/phpunit --testsuite 'Unit'",
"test-feature": "vendor/bin/phpunit --testsuite Feature"
},
"extra": {
"readme": "https://shahmal1yev.github.io/packages/EasyPay-PHP.html"
}
}
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Commands\Factories;
namespace EasyPay\PHP\Yigim\Tests\Unit\Commands\Factories;

use EasyPay\PHP\Yigim\Abstracts\ResponseHandlerAbstract;
use EasyPay\PHP\Yigim\Commands\Attributers\BatchCloseCommandAttributer;
use EasyPay\PHP\Yigim\Commands\EndpointProviders\BatchCloseCommandEndpointProvider;
use EasyPay\PHP\Yigim\Commands\Factories\BatchCloseCommandFactory;
use PHPUnit\Framework\TestCase;
use EasyPay\PHP\Yigim\Commands\ResponseHandlers\BatchCloseCommandResponseHandler;
use EasyPay\PHP\Yigim\Contracts\CommandAttributerContract;
use EasyPay\PHP\Yigim\Contracts\CommandEndpointProviderContract;
use PHPUnit\Framework\TestCase;

/**
* Class BatchCloseCommandFactoryTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Commands\Factories;
namespace EasyPay\PHP\Yigim\Tests\Unit\Commands\Factories;

use EasyPay\PHP\Yigim\Abstracts\ResponseHandlerAbstract;
use EasyPay\PHP\Yigim\Commands\Attributers\CancellationCommandAttributer;
use EasyPay\PHP\Yigim\Commands\EndpointProviders\CancellationCommandEndpointProvider;
use EasyPay\PHP\Yigim\Commands\Factories\CancellationCommandFactory;
use PHPUnit\Framework\TestCase;
use EasyPay\PHP\Yigim\Commands\ResponseHandlers\CancellationCommandResponseHandler;
use EasyPay\PHP\Yigim\Contracts\CommandAttributerContract;
use EasyPay\PHP\Yigim\Contracts\CommandEndpointProviderContract;
use PHPUnit\Framework\TestCase;

/**
* Class CancellationCommandFactoryTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Commands\Factories;
namespace EasyPay\PHP\Yigim\Tests\Unit\Commands\Factories;

use PHPUnit\Framework\TestCase;
use EasyPay\PHP\Yigim\Abstracts\ResponseHandlerAbstract;
use EasyPay\PHP\Yigim\Commands\Attributers\DirectPaymentCommandAttributer;
use EasyPay\PHP\Yigim\Commands\EndpointProviders\DirectPaymentCommandEndpointProvider;
use EasyPay\PHP\Yigim\Commands\Factories\DirectPaymentCommandFactory;
use EasyPay\PHP\Yigim\Commands\ResponseHandlers\DirectPaymentCommandResponseHandler;
use EasyPay\PHP\Yigim\Contracts\CommandAttributerContract;
use EasyPay\PHP\Yigim\Contracts\CommandEndpointProviderContract;
use PHPUnit\Framework\TestCase;

/**
* Class DirectPaymentCommandFactoryTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Commands\Factories;
namespace EasyPay\PHP\Yigim\Tests\Unit\Commands\Factories;

use EasyPay\PHP\Yigim\Abstracts\ResponseHandlerAbstract;
use EasyPay\PHP\Yigim\Commands\Attributers\InitializationCommandAttributer;
use EasyPay\PHP\Yigim\Commands\EndpointProviders\InitializationCommandEndpointProvider;
use EasyPay\PHP\Yigim\Commands\Factories\InitializationCommandFactory;
use PHPUnit\Framework\TestCase;
use EasyPay\PHP\Yigim\Commands\ResponseHandlers\InitializationCommandResponseHandler;
use EasyPay\PHP\Yigim\Contracts\CommandAttributerContract;
use EasyPay\PHP\Yigim\Contracts\CommandEndpointProviderContract;
use PHPUnit\Framework\TestCase;

/**
* Class InitializationCommandFactoryTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Commands\Factories;
namespace EasyPay\PHP\Yigim\Tests\Unit\Commands\Factories;

use EasyPay\PHP\Yigim\Abstracts\ResponseHandlerAbstract;
use EasyPay\PHP\Yigim\Commands\Attributers\PaymentClearanceCommandAttributer;
use EasyPay\PHP\Yigim\Commands\EndpointProviders\PaymentClearanceCommandEndpointProvider;
use EasyPay\PHP\Yigim\Commands\Factories\PaymentClearanceCommandFactory;
use PHPUnit\Framework\TestCase;
use EasyPay\PHP\Yigim\Commands\ResponseHandlers\PaymentClearanceCommandResponseHandler;
use EasyPay\PHP\Yigim\Contracts\CommandAttributerContract;
use EasyPay\PHP\Yigim\Contracts\CommandEndpointProviderContract;
use PHPUnit\Framework\TestCase;

/**
* Class PaymentClearanceCommandFactoryTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Commands\Factories;
namespace EasyPay\PHP\Yigim\Tests\Unit\Commands\Factories;

use EasyPay\PHP\Yigim\Abstracts\ResponseHandlerAbstract;
use EasyPay\PHP\Yigim\Commands\Attributers\RefundCommandAttributer;
use EasyPay\PHP\Yigim\Commands\EndpointProviders\RefundCommandEndpointProvider;
use EasyPay\PHP\Yigim\Commands\Factories\RefundCommandFactory;
use PHPUnit\Framework\TestCase;
use EasyPay\PHP\Yigim\Commands\ResponseHandlers\RefundCommandResponseHandler;
use EasyPay\PHP\Yigim\Contracts\CommandAttributerContract;
use EasyPay\PHP\Yigim\Contracts\CommandEndpointProviderContract;
use PHPUnit\Framework\TestCase;

/**
* Class RefundCommandFactoryTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Commands\Factories;
namespace EasyPay\PHP\Yigim\Tests\Unit\Commands\Factories;

use EasyPay\PHP\Yigim\Abstracts\ResponseHandlerAbstract;
use EasyPay\PHP\Yigim\Commands\Attributers\StatusCommandAttributer;
use EasyPay\PHP\Yigim\Commands\EndpointProviders\StatusCommandEndpointProvider;
use EasyPay\PHP\Yigim\Commands\Factories\StatusCommandFactory;
use PHPUnit\Framework\TestCase;
use EasyPay\PHP\Yigim\Commands\ResponseHandlers\StatusCommandResponseHandler;
use EasyPay\PHP\Yigim\Contracts\CommandAttributerContract;
use EasyPay\PHP\Yigim\Contracts\CommandEndpointProviderContract;
use PHPUnit\Framework\TestCase;

/**
* Class StatusCommandFactoryTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Commands\ResponseHandlers;
namespace EasyPay\PHP\Yigim\Tests\Unit\Commands\ResponseHandlers;

use ReflectionException;
use EasyPay\PHP\Yigim\Commands\ResponseData\BatchCloseCommandResponseData;
use EasyPay\PHP\Yigim\Commands\ResponseHandlers\BatchCloseCommandResponseHandler;
use PHPUnit\Framework\TestCase;
use EasyPay\PHP\Yigim\Contracts\ResponseDataContract;
use EasyPay\PHP\Yigim\Exceptions\ResponseHandlerJsonDecodeException;
use EasyPay\PHP\Yigim\Exceptions\ResponseHasMissingFieldsException;
use PHPUnit\Framework\TestCase;
use ReflectionException;

/**
* Class BatchCloseCommandResponseHandlerTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Commands\ResponseHandlers;
namespace EasyPay\PHP\Yigim\Tests\Unit\Commands\ResponseHandlers;

use ReflectionException;
use EasyPay\PHP\Yigim\Commands\ResponseData\CancellationCommandResponseData;
use EasyPay\PHP\Yigim\Commands\ResponseHandlers\CancellationCommandResponseHandler;
use PHPUnit\Framework\TestCase;
use EasyPay\PHP\Yigim\Contracts\ResponseDataContract;
use EasyPay\PHP\Yigim\Exceptions\ResponseHandlerJsonDecodeException;
use EasyPay\PHP\Yigim\Exceptions\ResponseHasMissingFieldsException;
use PHPUnit\Framework\TestCase;
use ReflectionException;

/**
* Class CancellationCommandResponseHandlerTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Commands\ResponseHandlers;
namespace EasyPay\PHP\Yigim\Tests\Unit\Commands\ResponseHandlers;

use ReflectionException;
use EasyPay\PHP\Yigim\Commands\ResponseData\DirectPaymentCommandResponseData;
use EasyPay\PHP\Yigim\Commands\ResponseHandlers\DirectPaymentCommandResponseHandler;
use PHPUnit\Framework\TestCase;
use EasyPay\PHP\Yigim\Contracts\ResponseDataContract;
use EasyPay\PHP\Yigim\Exceptions\ResponseHandlerJsonDecodeException;
use EasyPay\PHP\Yigim\Exceptions\ResponseHasMissingFieldsException;
use PHPUnit\Framework\TestCase;
use ReflectionException;

/**
* Class DirectPaymentCommandResponseHandlerTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Commands\ResponseHandlers;
namespace EasyPay\PHP\Yigim\Tests\Unit\Commands\ResponseHandlers;

use ReflectionException;
use EasyPay\PHP\Yigim\Commands\ResponseData\InitializationCommandResponseData;
use PHPUnit\Framework\TestCase;
use EasyPay\PHP\Yigim\Commands\ResponseHandlers\InitializationCommandResponseHandler;
use EasyPay\PHP\Yigim\Contracts\ResponseDataContract;
use EasyPay\PHP\Yigim\Exceptions\ResponseHandlerJsonDecodeException;
use EasyPay\PHP\Yigim\Exceptions\ResponseHasMissingFieldsException;
use PHPUnit\Framework\TestCase;
use ReflectionException;

/**
* Class InitializationCommandResponseHandlerTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Commands\ResponseHandlers;
namespace EasyPay\PHP\Yigim\Tests\Unit\Commands\ResponseHandlers;

use ReflectionException;
use EasyPay\PHP\Yigim\Commands\ResponseData\PaymentClearanceCommandResponseData;
use EasyPay\PHP\Yigim\Commands\ResponseHandlers\PaymentClearanceCommandResponseHandler;
use PHPUnit\Framework\TestCase;
use EasyPay\PHP\Yigim\Contracts\ResponseDataContract;
use EasyPay\PHP\Yigim\Exceptions\ResponseHandlerJsonDecodeException;
use EasyPay\PHP\Yigim\Exceptions\ResponseHasMissingFieldsException;
use PHPUnit\Framework\TestCase;
use ReflectionException;

/**
* Class PaymentClearanceCommandResponseHandlerTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Commands\ResponseHandlers;
namespace EasyPay\PHP\Yigim\Tests\Unit\Commands\ResponseHandlers;

use ReflectionException;
use EasyPay\PHP\Yigim\Commands\ResponseData\RefundCommandResponseData;
use EasyPay\PHP\Yigim\Commands\ResponseHandlers\RefundCommandResponseHandler;
use PHPUnit\Framework\TestCase;
use EasyPay\PHP\Yigim\Contracts\ResponseDataContract;
use EasyPay\PHP\Yigim\Exceptions\ResponseHandlerJsonDecodeException;
use EasyPay\PHP\Yigim\Exceptions\ResponseHasMissingFieldsException;
use PHPUnit\Framework\TestCase;
use ReflectionException;

/**
* Class RefundCommandResponseHandlerTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Commands\ResponseHandlers;
namespace EasyPay\PHP\Yigim\Tests\Unit\Commands\ResponseHandlers;

use PHPUnit\Framework\TestCase;
use ReflectionException;
use EasyPay\PHP\Yigim\Commands\ResponseData\StatusCommandResponseData;
use EasyPay\PHP\Yigim\Commands\ResponseHandlers\StatusCommandResponseHandler;
use EasyPay\PHP\Yigim\Contracts\ResponseDataContract;
use EasyPay\PHP\Yigim\Exceptions\ResponseHandlerJsonDecodeException;
use EasyPay\PHP\Yigim\Exceptions\ResponseHasMissingFieldsException;
use PHPUnit\Framework\TestCase;
use ReflectionException;

/**
* Class StatusCommandResponseHandler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Executors;
namespace EasyPay\PHP\Yigim\Tests\Unit\Executors;

use PHPUnit\Framework\MockObject\Exception;
use ReflectionClass;
use ReflectionException;
use EasyPay\PHP\Yigim\Abstracts\ResponseHandlerAbstract;
use EasyPay\PHP\Yigim\Contracts\CommandAttributerContract;
use EasyPay\PHP\Yigim\Contracts\CommandEndpointProviderContract;
use EasyPay\PHP\Yigim\Contracts\CommandFactoryContract;
use EasyPay\PHP\Yigim\Contracts\ResponseDataContract;
use EasyPay\PHP\Yigim\Exceptions\CommandExecutionFailedException;
use EasyPay\PHP\Yigim\Executors\CommandExecutor;
use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\TestCase;
use ReflectionClass;
use ReflectionException;

/**
* Class CommandExecutorTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Facades;
namespace EasyPay\PHP\Yigim\Tests\Unit\Facades;

use EasyPay\PHP\Yigim\Contracts\CommandAttributerContract;
use EasyPay\PHP\Yigim\Contracts\CommandExecutorContract;
use EasyPay\PHP\Yigim\Facades\CommandFacade;
use PHPUnit\Framework\TestCase;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Helpers;
namespace EasyPay\PHP\Yigim\Tests\Unit\Helpers;

use EasyPay\PHP\Yigim\Helpers\Arr;
use PHPUnit\Framework\TestCase;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Traits\Commands\Attributes;
namespace EasyPay\PHP\Yigim\Tests\Unit\Traits\Commands\Attributes;

use EasyPay\PHP\Yigim\Exceptions\InvalidAmountException;
use EasyPay\PHP\Yigim\Traits\Commands\Attributes\AmountCommandAttributeTrait;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Traits\Commands\Attributes;
namespace EasyPay\PHP\Yigim\Tests\Unit\Traits\Commands\Attributes;

use EasyPay\PHP\Yigim\Traits\Commands\Attributes\BillerCommandAttributeTrait;
use PHPUnit\Framework\TestCase;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Traits\Commands\Attributes;
namespace EasyPay\PHP\Yigim\Tests\Unit\Traits\Commands\Attributes;

use EasyPay\PHP\Yigim\Exceptions\InvalidCallbackURLException;
use EasyPay\PHP\Yigim\Traits\Commands\Attributes\CallbackCommandAttributeTrait;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Traits\Commands\Attributes;
namespace EasyPay\PHP\Yigim\Tests\Unit\Traits\Commands\Attributes;

use EasyPay\PHP\Yigim\Exceptions\XTypeUnsupportedArgumentException;
use EasyPay\PHP\Yigim\Helpers\Arr;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace EasyPay\PHP\Yigim\Tests\Traits\Commands\Attributes;
namespace EasyPay\PHP\Yigim\Tests\Unit\Traits\Commands\Attributes;

use EasyPay\PHP\Yigim\Traits\Commands\Attributes\CscCommandAttributeTrait;
use PHPUnit\Framework\TestCase;
Expand Down
Loading

0 comments on commit 0eb5078

Please sign in to comment.