Skip to content

Commit

Permalink
moved test helper to concerns (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
ersin-demirtas authored Jul 18, 2021
1 parent cdd0fb6 commit 577dfdf
Show file tree
Hide file tree
Showing 48 changed files with 47 additions and 49 deletions.
1 change: 0 additions & 1 deletion tests/Concerns/LoadsStub.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php


namespace PolygonIO\Tests\Concerns;

trait LoadsStub
Expand Down
3 changes: 1 addition & 2 deletions tests/Helpers/MocksHttp.php → tests/Concerns/MocksHttp.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

namespace PolygonIO\Tests\Helpers;

namespace PolygonIO\Tests\Concerns;

use GuzzleHttp\Client;
use GuzzleHttp\Handler\MockHandler;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Crypto/AggregatesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use PHPUnit\Framework\TestCase;
use PolygonIO\Rest\Crypto\Aggregates;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class AggregatesTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Crypto/CryptoExchangesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Crypto\CryptoExchanges;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class CryptoExchangesTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Crypto/DailyOpenCloseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Crypto\DailyOpenClose;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class DailyOpenCloseTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Crypto/GroupedDailyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Crypto\GroupedDaily;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class GroupedDailyTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Crypto/HistoricCryptoTradeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Crypto\HistoricCryptoTrade;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class HistoricCryptoTradeTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Crypto/LastTradeForCryptoPairTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Crypto\LastTradeForCryptoPair;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class LastTradeForCryptoPairTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Crypto/PreviousCloseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Crypto\PreviousClose;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class PreviousCloseTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Crypto/SnapshotAllTickersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Crypto\SnapshotAllTickers;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class SnapshotAllTickersTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Crypto/SnapshotGainersLosersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use PHPUnit\Framework\TestCase;
use PolygonIO\Rest\Crypto\SnapshotGainersLosers;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class SnapshotGainersLosersTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Crypto/SnapshotSingleTickerFullBookTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use PHPUnit\Framework\TestCase;
use PolygonIO\Rest\Crypto\SnapshotSingleTickerFullBook;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class SnapshotSingleTickerFullBookTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Crypto/SnapshotSingleTickerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Crypto\SnapshotSingleTicker;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class SnapshotSingleTickerTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Forex/AggregatesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Forex\Aggregates;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class AggregatesTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Forex/ForexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use PHPUnit\Framework\TestCase;
use PolygonIO\Rest\Forex\Forex;
use PolygonIO\Rest\RestResource;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class ForexTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Forex/GroupedDailyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Forex\GroupedDaily;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class GroupedDailyTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Forex/HistoricForexTickTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Forex\HistoricForexTick;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class HistoricForexTickTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Forex/LastQuoteForCurrencyPairTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Forex\LastQuoteForCurrencyPair;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class LastQuoteForCurrencyPairTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Forex/PreviousCloseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Forex\PreviousClose;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class PreviousCloseTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Forex/RealTimeCurrencyConversionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Forex\RealTimeCurrencyConversion;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class RealTimeCurrencyConversionTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Forex/SnapshotAllTickersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Forex\SnapshotAllTickers;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class SnapshotAllTickersTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Forex/SnapshotGainersLosersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Forex\SnapshotGainersLosers;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class SnapshotGainersLosersTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Reference/LocalesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Reference\Locales;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class LocalesTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Reference/MarketHolidaysTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Reference\MarketHolidays;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class MarketHolidaysTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Reference/MarketStatusTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Reference\MarketStatus;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class MarketStatusTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Reference/MarketsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Reference\Markets;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class MarketsTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Reference/ReferenceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use PHPUnit\Framework\TestCase;
use PolygonIO\Rest\Reference\Reference;
use PolygonIO\Rest\RestResource;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class ReferenceTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Reference/StockDividendsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Reference\StockDividends;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class StockDividendsTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Reference/StockFinancialsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Reference\StockFinancials;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class StockFinancialsTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Reference/StockSplitsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Reference\StockSplits;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class StockSplitsTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Reference/TickerDetailsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use PolygonIO\Rest\Reference\TickerDetails;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class TickerDetailsTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Reference/TickerTypesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Reference\TickerTypes;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class TickerTypesTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Stocks/AggregatesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PolygonIO\Tests\Rest\Stocks;

use PolygonIO\Rest\Stocks\Aggregates;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class AggregatesTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Stocks/ConditionMappingsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PolygonIO\Tests\Rest\Stocks;

use PolygonIO\Rest\Stocks\ConditionMappings;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class ConditionMappingsTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Stocks/DailyOpenCloseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PolygonIO\Tests\Rest\Stocks;

use PolygonIO\Rest\Stocks\DailyOpenClose;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class DailyOpenCloseTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Stocks/ExchangesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PolygonIO\Tests\Rest\Stocks;

use PolygonIO\Rest\Stocks\Exchanges;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class ExchangesTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Stocks/GroupedDailyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PolygonIO\Tests\Rest\Stocks;

use PolygonIO\Rest\Stocks\GroupedDaily;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class GroupedDailyTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Stocks/HistoricQuotesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PolygonIO\Tests\Rest\Stocks;

use PolygonIO\Rest\Stocks\HistoricQuotes;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class HistoricQuotesTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Stocks/HistoricQuotesV2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PolygonIO\Tests\Rest\Stocks;

use PolygonIO\Rest\Stocks\HistoricQuotesV2;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class HistoricQuotesV2Test extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Stocks/HistoricTradesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


use PolygonIO\Rest\Stocks\HistoricTrades;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class HistoricTradesTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Stocks/HistoricTradesV2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PolygonIO\Rest\Stocks\HistoricTradesV2;
use PolygonIO\Tests\Concerns\LoadsStub;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class HistoricTradesV2Test extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Stocks/LastQuoteForSymbolTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PolygonIO\Tests\Rest\Stocks;

use PolygonIO\Rest\Stocks\LastQuoteForSymbol;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class LastQuoteForSymbolTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Stocks/LastTradeForSymbolTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PolygonIO\Tests\Rest\Stocks;

use PolygonIO\Rest\Stocks\LastTradeForSymbol;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class LastTradeForSymbolTest extends \PHPUnit\Framework\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Rest/Stocks/PreviousCloseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PolygonIO\Tests\Rest\Stocks;

use PolygonIO\Rest\Stocks\PreviousClose;
use PolygonIO\Tests\Helpers\MocksHttp;
use PolygonIO\Tests\Concerns\MocksHttp;

class PreviousCloseTest extends \PHPUnit\Framework\TestCase
{
Expand Down
Loading

0 comments on commit 577dfdf

Please sign in to comment.