Skip to content

Commit

Permalink
Enable php_unit_internal_class rule (#874)
Browse files Browse the repository at this point in the history
  • Loading branch information
ob-stripe authored Feb 13, 2020
1 parent cbcbec1 commit 87b4701
Show file tree
Hide file tree
Showing 88 changed files with 527 additions and 102 deletions.
1 change: 0 additions & 1 deletion .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ return PhpCsFixer\Config::create()
'spacing' => 'one',
],
'ordered_class_elements' => false,
'php_unit_internal_class' => false,
'php_unit_test_class_requires_covers' => false,
'phpdoc_align' => false,
'protected_to_private' => false,
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/AccountLinkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class AccountLinkTest extends TestCase
/**
* @internal
*/
final class AccountLinkTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

public function testIsCreatable()
{
$this->expectsRequest(
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/AccountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class AccountTest extends TestCase
/**
* @internal
*/
final class AccountTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = 'acct_123';
const TEST_CAPABILITY_ID = 'acap_123';
const TEST_EXTERNALACCOUNT_ID = 'ba_123';
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/AlipayAccountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class AlipayAccountTest extends TestCase
/**
* @internal
*/
final class AlipayAccountTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = 'aliacc_123';

// Because of the wildcard nature of sources, stripe-mock cannot currently
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/ApiRequestorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@

use Stripe\HttpClient\CurlClient;

class ApiRequestorTest extends TestCase
/**
* @internal
*/
final class ApiRequestorTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

public function testEncodeObjects()
{
$reflector = new \ReflectionClass(\Stripe\ApiRequestor::class);
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/ApplePayDomainTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class ApplePayDomainTest extends TestCase
/**
* @internal
*/
final class ApplePayDomainTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = 'apwc_123';

public function testIsListable()
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/ApplicationFeeRefundTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class ApplicationFeeRefundTest extends TestCase
/**
* @internal
*/
final class ApplicationFeeRefundTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = 'fr_123';
const TEST_FEE_ID = 'fee_123';

Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/ApplicationFeeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class ApplicationFeeTest extends TestCase
/**
* @internal
*/
final class ApplicationFeeTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = 'fee_123';
const TEST_FEEREFUND_ID = 'fr_123';

Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/BalanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class BalanceTest extends TestCase
/**
* @internal
*/
final class BalanceTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

public function testIsRetrievable()
{
$this->expectsRequest(
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/BalanceTransactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class BalanceTransactionTest extends TestCase
/**
* @internal
*/
final class BalanceTransactionTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = 'txn_123';

public function testIsListable()
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/BankAccountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class BankAccountTest extends TestCase
/**
* @internal
*/
final class BankAccountTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = 'ba_123';

// Because of the wildcard nature of sources, stripe-mock cannot currently
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/BitcoinReceiverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class BitcoinReceiverTest extends TestCase
/**
* @internal
*/
final class BitcoinReceiverTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = 'btcrcv_123';

// Because of the wildcard nature of sources, stripe-mock cannot currently
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/CapabilityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class CapabilityTest extends TestCase
/**
* @internal
*/
final class CapabilityTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_ACCOUNT_ID = 'acct_123';
const TEST_RESOURCE_ID = 'acap_123';

Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/CardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class CardTest extends TestCase
/**
* @internal
*/
final class CardTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = 'card_123';

// Because of the wildcard nature of sources, stripe-mock cannot currently
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/ChargeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class ChargeTest extends TestCase
/**
* @internal
*/
final class ChargeTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = 'ch_123';

public function testIsListable()
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/Checkout/SessionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe\Checkout;

class SessionTest extends \Stripe\TestCase
/**
* @internal
*/
final class SessionTest extends \PHPUnit\Framework\TestCase
{
use \Stripe\TestHelper;

const TEST_RESOURCE_ID = 'cs_123';

public function testIsCreatable()
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class CollectionTest extends TestCase
/**
* @internal
*/
final class CollectionTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

/** @var \Stripe\Collection */
private $fixture;

Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/CountrySpecTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class CountrySpecTest extends TestCase
/**
* @internal
*/
final class CountrySpecTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = 'US';

public function testIsListable()
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/CouponTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class CouponTest extends TestCase
/**
* @internal
*/
final class CouponTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = '25OFF';

public function testIsListable()
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/CreditNoteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class CreditNoteTest extends TestCase
/**
* @internal
*/
final class CreditNoteTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = 'cn_123';

public function testIsListable()
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/CustomerBalanceTransactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class CustomerBalanceTransactionTest extends TestCase
/**
* @internal
*/
final class CustomerBalanceTransactionTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_CUSTOMER_ID = 'cus_123';
const TEST_RESOURCE_ID = 'cbtxn_123';

Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/CustomerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class CustomerTest extends TestCase
/**
* @internal
*/
final class CustomerTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = 'cus_123';
const TEST_SOURCE_ID = 'ba_123';
const TEST_TAX_ID_ID = 'txi_123';
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/DisputeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class DisputeTest extends TestCase
/**
* @internal
*/
final class DisputeTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = 'dp_123';

public function testIsListable()
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/EphemeralKeyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class EphemeralKeyTest extends TestCase
/**
* @internal
*/
final class EphemeralKeyTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

public function testIsCreatable()
{
$this->expectsRequest(
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/ErrorObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class ErrorObjectTest extends TestCase
/**
* @internal
*/
final class ErrorObjectTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

public function testDefaultValues()
{
$error = ErrorObject::constructFrom([]);
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/EventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe;

class EventTest extends TestCase
/**
* @internal
*/
final class EventTest extends \PHPUnit\Framework\TestCase
{
use TestHelper;

const TEST_RESOURCE_ID = 'evt_123';

public function testIsListable()
Expand Down
7 changes: 6 additions & 1 deletion tests/Stripe/Exception/ApiErrorExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

namespace Stripe\Exception;

class ApiErrorExceptionTest extends \Stripe\TestCase
/**
* @internal
*/
final class ApiErrorExceptionTest extends \PHPUnit\Framework\TestCase
{
use \Stripe\TestHelper;

public function createFixture()
{
$mock = $this->getMockForAbstractClass(ApiErrorException::class);
Expand Down
Loading

0 comments on commit 87b4701

Please sign in to comment.