Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify ECS skip option #213

Merged
merged 3 commits into from
Jan 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"orchestra/testbench": "^4.0 || ^5.0 || ^6.0",
"phpstan/phpstan-mockery": "^1.0",
"phpunit/phpunit": "^8.0,<8.5.12 || ^9.3.3",
"zing/coding-standard": "^5.0"
"zing/coding-standard": "^5.1"
},
"autoload": {
"psr-4": {
Expand Down
8 changes: 0 additions & 8 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

declare(strict_types=1);

use PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitInternalClassFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitTestClassRequiresCoversFixer;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\ValueObject\Option;
use Zing\CodingStandard\Set\ECSSetList;
Expand All @@ -16,11 +13,6 @@

$parameters = $containerConfigurator->parameters();
$parameters->set(Option::PARALLEL, true);
$parameters->set(Option::SKIP, [
YodaStyleFixer::class => null,
PhpUnitInternalClassFixer::class,
PhpUnitTestClassRequiresCoversFixer::class,
]);
$parameters->set(
Option::PATHS,
[__DIR__ . '/config', __DIR__ . '/src', __DIR__ . '/tests', __DIR__ . '/ecs.php', __DIR__ . '/rector.php']
Expand Down
5 changes: 4 additions & 1 deletion tests/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
use Zing\LaravelSms\Commands\SmsSwitchConnectionCommand;
use function config;

class CommandTest extends TestCase
/**
* @internal
*/
final class CommandTest extends TestCase
{
public function testCommand(): void
{
Expand Down
5 changes: 4 additions & 1 deletion tests/Drivers/DriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
use Zing\LaravelSms\Exceptions\CouldNotSendNotification;
use Zing\LaravelSms\Tests\TestCase;

class DriverTest extends TestCase
/**
* @internal
*/
final class DriverTest extends TestCase
{
public function testException(): void
{
Expand Down
5 changes: 4 additions & 1 deletion tests/Drivers/MeiLianDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
use Zing\LaravelSms\SmsMessage;
use Zing\LaravelSms\Tests\TestCase;

class MeiLianDriverTest extends TestCase
/**
* @internal
*/
final class MeiLianDriverTest extends TestCase
{
/**
* @var string
Expand Down
5 changes: 4 additions & 1 deletion tests/Drivers/NullDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
use Zing\LaravelSms\SmsMessage;
use Zing\LaravelSms\Tests\TestCase;

class NullDriverTest extends TestCase
/**
* @internal
*/
final class NullDriverTest extends TestCase
{
public function testSend(): void
{
Expand Down
5 changes: 4 additions & 1 deletion tests/Drivers/YunpianDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
use Zing\LaravelSms\SmsMessage;
use Zing\LaravelSms\Tests\TestCase;

class YunpianDriverTest extends TestCase
/**
* @internal
*/
final class YunpianDriverTest extends TestCase
{
public function testSend(): void
{
Expand Down
5 changes: 4 additions & 1 deletion tests/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
use Zing\LaravelSms\SmsMessage;
use Zing\LaravelSms\SmsNumber;

class IntegrationTest extends TestCase
/**
* @internal
*/
final class IntegrationTest extends TestCase
{
protected function getEnvironmentSetUp($app): void
{
Expand Down
5 changes: 4 additions & 1 deletion tests/MessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
use Overtrue\EasySms\Contracts\MessageInterface;
use Zing\LaravelSms\SmsMessage;

class MessageTest extends TestCase
/**
* @internal
*/
final class MessageTest extends TestCase
{
public function testStaticCreate(): void
{
Expand Down
5 changes: 4 additions & 1 deletion tests/ServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
use Zing\LaravelSms\Facades\Sms;
use Zing\LaravelSms\SmsMessage;

class ServiceProviderTest extends TestCase
/**
* @internal
*/
final class ServiceProviderTest extends TestCase
{
public function testSms(): void
{
Expand Down
5 changes: 4 additions & 1 deletion tests/SmsManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
use Zing\LaravelSms\SmsManager;
use Zing\LaravelSms\SmsMessage;

class SmsManagerTest extends TestCase
/**
* @internal
*/
final class SmsManagerTest extends TestCase
{
/**
* @var string
Expand Down
5 changes: 4 additions & 1 deletion tests/SmsNumberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
use Overtrue\EasySms\Message;
use Zing\LaravelSms\SmsNumber;

class SmsNumberTest extends TestCase
/**
* @internal
*/
final class SmsNumberTest extends TestCase
{
/**
* @param \Overtrue\EasySms\Contracts\PhoneNumberInterface|string $number
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Zing\LaravelSms\Gateways\YunpianGateway;
use Zing\LaravelSms\SmsServiceProvider;

class TestCase extends BaseTestCase
abstract class TestCase extends BaseTestCase
{
/**
* @var string
Expand All @@ -26,7 +26,7 @@ class TestCase extends BaseTestCase
*/
public static function assertSameMessage($expected, $actual, string $message = ''): void
{
static::assertThat($actual, new IsEqual($expected), $message);
self::assertThat($actual, new IsEqual($expected), $message);
}

/**
Expand Down
5 changes: 4 additions & 1 deletion tests/VerificationCodeManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
use Zing\LaravelSms\SmsNumber;
use Zing\LaravelSms\VerificationCodeManager;

class VerificationCodeManagerTest extends TestCase
/**
* @internal
*/
final class VerificationCodeManagerTest extends TestCase
{
use WithFaker;

Expand Down