Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
use function Flow\ETL\Adapter\ChartJS\{bar_chart, line_chart, pie_chart, to_chartjs, to_chartjs_file, to_chartjs_var};
use function Flow\ETL\DSL\{df, first, from_array, lit, ref, refs, sum};
use function Flow\Filesystem\DSL\path;
use PHPUnit\Framework\TestCase;
use Flow\ETL\Tests\FlowTestCase;

final class ChartJSLoaderTest extends TestCase
final class ChartJSLoaderTest extends FlowTestCase
{
public function test_loading_data_to_bar_chart() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
use function Flow\ETL\DSL\{df, from_memory, ref, refs};
use Flow\ETL\Adapter\ChartJS\Chart\BarChart;
use Flow\ETL\Memory\ArrayMemory;
use PHPUnit\Framework\TestCase;
use Flow\ETL\Tests\FlowTestCase;

final class BarChartTest extends TestCase
final class BarChartTest extends FlowTestCase
{
public function test_collecting_data_from_rows() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
use function Flow\ETL\Adapter\CSV\{from_csv, to_csv};
use function Flow\ETL\DSL\{df, overwrite, ref};
use Flow\ETL\Tests\Double\FakeExtractor;
use PHPUnit\Framework\TestCase;
use Flow\ETL\Tests\FlowTestCase;

final class CSVTest extends TestCase
final class CSVTest extends FlowTestCase
{
protected function setUp() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

use Flow\ETL\Adapter\CSV\Detector\Option;
use Flow\ETL\Exception\InvalidArgumentException;
use PHPUnit\Framework\TestCase;
use Flow\ETL\Tests\FlowTestCase;

final class OptionTest extends TestCase
final class OptionTest extends FlowTestCase
{
public function test_empty_enclosure() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use Doctrine\DBAL\Tools\DsnParser;
use Doctrine\DBAL\{Configuration, DriverManager};
use Flow\ETL\Adapter\Doctrine\Tests\Context\{DatabaseContext, InsertQueryCounter};
use PHPUnit\Framework\TestCase;
use Flow\ETL\Tests\FlowTestCase;

abstract class IntegrationTestCase extends TestCase
abstract class IntegrationTestCase extends FlowTestCase
{
protected DatabaseContext $pgsqlDatabaseContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
namespace Flow\ETL\Adapter\Doctrine\Tests\Unit;

use Flow\ETL\Adapter\Doctrine\Pages;
use PHPUnit\Framework\TestCase;
use Flow\ETL\Tests\FlowTestCase;

final class PagesTest extends TestCase
final class PagesTest extends FlowTestCase
{
public function test_total_even_pages() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

declare(strict_types=1);

namespace Flow\ETL\Adapter\Elasticsearch\Tests\Integration\ElasticsearchPHP;
namespace Flow\ETL\Adapter\Elasticsearch\Tests\Integration;

use function Flow\ETL\Adapter\Elasticsearch\{es_hits_to_rows, from_es, to_es_bulk_index};
use function Flow\ETL\DSL\{bool_entry, int_entry, string_entry};
use Flow\ETL\Adapter\Elasticsearch\EntryIdFactory\EntryIdFactory;
use Flow\ETL\Adapter\Elasticsearch\Tests\Integration\TestCase;
use Flow\ETL\{Flow, Row, Rows};

final class IntegrationTest extends TestCase
final class ElasticsearchIntegrationTest extends ElasticsearchTestCase
{
public const DESTINATION_INDEX = 'etl-test-destination-index';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@
use function Flow\ETL\DSL\{bool_entry, df, generate_random_int, int_entry, string_entry};
use Flow\ETL\Adapter\Elasticsearch\ElasticsearchPHP\DocumentDataSource;
use Flow\ETL\Adapter\Elasticsearch\EntryIdFactory\EntryIdFactory;
use Flow\ETL\Adapter\Elasticsearch\Tests\Integration\TestCase;
use Flow\ETL\{Config, Flow, FlowContext, Row, Rows};

final class ElasticsearchExtractorTest extends TestCase
use Flow\ETL\{Adapter\Elasticsearch\Tests\Integration\ElasticsearchTestCase,
Config,
Flow,
FlowContext,
Row,
Rows
};

final class ElasticsearchExtractorTest extends ElasticsearchTestCase
{
public const INDEX_NAME = 'etl-test-index';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

use function Flow\ETL\Adapter\Elasticsearch\{entry_id_factory, hash_id_factory, to_es_bulk_index, to_es_bulk_update};
use function Flow\ETL\DSL\{generate_random_string, string_entry};
use Flow\ETL\Adapter\Elasticsearch\Tests\Integration\TestCase;
use Flow\ETL\{Config, FlowContext, Row, Rows};
use Flow\ETL\{Adapter\Elasticsearch\Tests\Integration\ElasticsearchTestCase, Config, FlowContext, Row, Rows};

final class ElasticsearchLoaderTest extends TestCase
final class ElasticsearchLoaderTest extends ElasticsearchTestCase
{
public const INDEX_NAME = 'etl-test-index';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Flow\ETL\Adapter\Elasticsearch\Tests\Doubles\Spy\HttpClientSpy;
use Flow\ETL\Flow;

final class ElasticsearchTest extends TestCase
final class ElasticsearchTest extends ElasticsearchTestCase
{
public function test_batch_size_when_its_not_explicitly_set() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
namespace Flow\ETL\Adapter\Elasticsearch\Tests\Integration;

use Flow\ETL\Adapter\Elasticsearch\Tests\Context\{Elasticsearch7Context, Elasticsearch8Context, ElasticsearchContext};
use Flow\ETL\Tests\FlowTestCase;

abstract class TestCase extends \PHPUnit\Framework\TestCase
abstract class ElasticsearchTestCase extends FlowTestCase
{
protected ElasticsearchContext $elasticsearchContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use Flow\ETL\Adapter\Elasticsearch\EntryIdFactory\HashIdFactory;
use Flow\ETL\Hash\NativePHPHash;
use Flow\ETL\Row;
use PHPUnit\Framework\TestCase;
use Flow\ETL\Tests\FlowTestCase;

final class HashIdFactoryTest extends TestCase
final class HashIdFactoryTest extends FlowTestCase
{
public function test_create_row() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

use Flow\ETL\Adapter\GoogleSheet\Columns;
use Flow\ETL\Exception\InvalidArgumentException;
use Flow\ETL\Tests\FlowTestCase;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

final class ColumnsTest extends TestCase
final class ColumnsTest extends FlowTestCase
{
public static function invalid_cases() : \Generator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
use function Flow\ETL\Adapter\GoogleSheet\from_google_sheet_columns;
use function Flow\ETL\DSL\{str_entry, string_entry};
use Flow\ETL\Exception\InvalidArgumentException;
use Flow\ETL\{Config\ConfigBuilder, FlowContext, Row, Rows};
use Flow\ETL\{Config\ConfigBuilder, FlowContext, Row, Rows, Tests\FlowTestCase};
use Google\Service\Sheets;
use Google\Service\Sheets\Resource\SpreadsheetsValues;
use PHPUnit\Framework\TestCase;

final class GoogleSheetExtractorTest extends TestCase
final class GoogleSheetExtractorTest extends FlowTestCase
{
public function test_its_stop_fetching_data_if_processed_row_count_is_less_then_last_range_end_row() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

use Flow\ETL\Adapter\GoogleSheet\{Columns, SheetRange};
use Flow\ETL\Exception\InvalidArgumentException;
use Flow\ETL\Tests\FlowTestCase;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

final class SheetRangeTest extends TestCase
final class SheetRangeTest extends FlowTestCase
{
public static function example_string_ranges() : \Generator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@

use Flow\ETL\Adapter\Http\DynamicExtractor\NextRequestFactory;
use Flow\ETL\Adapter\Http\PsrHttpClientDynamicExtractor;
use Flow\ETL\{Config, FlowContext};
use Flow\ETL\{Config, FlowContext, Tests\FlowTestCase};
use Http\Mock\Client;
use Nyholm\Psr7\Factory\Psr17Factory;
use Nyholm\Psr7\Response;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\{RequestInterface, ResponseInterface};

final class PsrHttpClientDynamicExtractorTest extends TestCase
final class PsrHttpClientDynamicExtractorTest extends FlowTestCase
{
public function test_http_extractor() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
namespace Flow\ETL\Adapter\HTTP\Tests\Integration;

use Flow\ETL\Adapter\Http\PsrHttpClientStaticExtractor;
use Flow\ETL\{Config, FlowContext, Rows};
use Flow\ETL\{Config, FlowContext, Rows, Tests\FlowTestCase};
use Http\Mock\Client;
use Nyholm\Psr7\Factory\Psr17Factory;
use Nyholm\Psr7\Response;
use PHPUnit\Framework\TestCase;

final class PsrHttpClientStaticExtractorTest extends TestCase
final class PsrHttpClientStaticExtractorTest extends FlowTestCase
{
public function test_http_extractor() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

use Flow\ETL\Adapter\Http\RequestEntriesFactory;
use Flow\ETL\Row\Entry\{JsonEntry, StringEntry};
use Flow\ETL\Tests\FlowTestCase;
use Nyholm\Psr7\Factory\Psr17Factory;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\RequestInterface;

final class RequestEntriesFactoryTest extends TestCase
final class RequestEntriesFactoryTest extends FlowTestCase
{
public static function requests() : \Generator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
use function Flow\ETL\DSL\{df, print_schema};
use Flow\ETL\Adapter\JSON\JSONMachine\JsonExtractor;
use Flow\ETL\Extractor\Signal;
use Flow\ETL\{Config, Flow, FlowContext, Row, Rows};
use Flow\ETL\{Config, Flow, FlowContext, Row, Rows, Tests\FlowTestCase};
use Flow\Filesystem\Path;
use PHPUnit\Framework\TestCase;

final class JsonExtractorTest extends TestCase
final class JsonExtractorTest extends FlowTestCase
{
public function test_extracting_json_from_local_file_stream() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
use function Flow\Filesystem\DSL\path;
use Flow\ETL\Adapter\JSON\JsonLoader;
use Flow\ETL\Tests\Double\FakeExtractor;
use Flow\ETL\{Config, FlowContext, Rows};
use PHPUnit\Framework\TestCase;
use Flow\ETL\{Config, FlowContext, Rows, Tests\FlowTestCase};

final class JsonTest extends TestCase
final class JsonTest extends FlowTestCase
{
public function test_json_loader() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
namespace Flow\ETL\Adapter\Logger\Tests\Unit\Logger;

use Flow\ETL\Adapter\Logger\Logger\DumpLogger;
use PHPUnit\Framework\TestCase;
use Flow\ETL\Tests\FlowTestCase;

final class DumpLoggerTest extends TestCase
final class DumpLoggerTest extends FlowTestCase
{
public function test_logger() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@

use function Flow\ETL\DSL\{int_entry, string_entry};
use Flow\ETL\Adapter\Logger\PsrLoggerLoader;
use Flow\ETL\{Config, FlowContext, Row, Rows};
use PHPUnit\Framework\TestCase;
use Flow\ETL\{Config, FlowContext, Row, Rows, Tests\FlowTestCase};
use Psr\Log\LogLevel;
use Psr\Log\Test\TestLogger;

final class PsrLoggerLoaderTest extends TestCase
final class PsrLoggerLoaderTest extends FlowTestCase
{
public function test_psr_logger_loader() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
use function Flow\ETL\DSL\{from_array, string_entry};
use Flow\ETL\Adapter\Meilisearch\Tests\Context\MeilisearchContext;
use Flow\ETL\Adapter\Meilisearch\Tests\Double\Spy\HttpClientSpy;
use Flow\ETL\{Flow, Row, Rows};
use PHPUnit\Framework\TestCase;
use Flow\ETL\{Flow, Row, Rows, Tests\FlowTestCase};

final class MailiSearchTest extends TestCase
final class MailiSearchTest extends FlowTestCase
{
private const DESTINATION_INDEX = 'etl-test-destination-index';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
use function Flow\ETL\Adapter\Meilisearch\{from_meilisearch, meilisearch_hits_to_rows, to_meilisearch_bulk_index};
use function Flow\ETL\DSL\{generate_random_int, string_entry};
use Flow\ETL\Adapter\Meilisearch\Tests\Context\MeilisearchContext;
use Flow\ETL\{Config, Flow, FlowContext, Row, Rows};
use PHPUnit\Framework\TestCase;
use Flow\ETL\{Config, Flow, FlowContext, Row, Rows, Tests\FlowTestCase};

final class MeilisearchExtractorTest extends TestCase
final class MeilisearchExtractorTest extends FlowTestCase
{
public const INDEX_NAME = 'etl-test-index';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
use function Flow\ETL\Adapter\Meilisearch\{to_meilisearch_bulk_index, to_meilisearch_bulk_update};
use function Flow\ETL\DSL\string_entry;
use Flow\ETL\Adapter\Meilisearch\Tests\Context\MeilisearchContext;
use Flow\ETL\{Config, FlowContext, Row, Rows};
use PHPUnit\Framework\TestCase;
use Flow\ETL\{Config, FlowContext, Row, Rows, Tests\FlowTestCase};

final class MeilisearchLoaderTest extends TestCase
final class MeilisearchLoaderTest extends FlowTestCase
{
private const INDEX_NAME = 'etl-test-index';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

use function Flow\ETL\DSL\{config, flow_context};
use Flow\ETL\Adapter\Parquet\ParquetExtractor;
use Flow\ETL\Tests\FlowTestCase;
use Flow\Filesystem\Path;
use Flow\Parquet\{Reader};
use PHPUnit\Framework\TestCase;

final class PaginationTest extends TestCase
final class PaginationTest extends FlowTestCase
{
public function test_multifile_pagination_from_beginning() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@

use Flow\ETL\Adapter\Parquet\ParquetExtractor;
use Flow\ETL\Extractor\Signal;
use Flow\ETL\{Config, FlowContext};
use Flow\ETL\{Config, FlowContext, Tests\FlowTestCase};
use Flow\Filesystem\Path;
use Flow\Parquet\{Options, Reader};
use PHPUnit\Framework\TestCase;

final class ParquetExtractorTest extends TestCase
final class ParquetExtractorTest extends FlowTestCase
{
public function test_limit() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
use function Flow\ETL\Adapter\Parquet\{from_parquet, to_parquet};
use function Flow\ETL\DSL\{df, from_array, json_schema, schema, str_schema};
use Flow\ETL\Tests\Double\FakeExtractor;
use Flow\ETL\{Flow};
use Flow\ETL\{Flow, Tests\FlowTestCase};
use Flow\Parquet\ParquetFile\Compressions;
use Flow\Parquet\Reader;
use PHPUnit\Framework\TestCase;
use Ramsey\Uuid\Uuid;

final class ParquetTest extends TestCase
final class ParquetTest extends FlowTestCase
{
public function test_writing_to_file() : void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
use Flow\ETL\PHP\Type\Logical\Structure\StructureElement;
use Flow\ETL\PHP\Type\Logical\{ListType, MapType, StructureType};
use Flow\ETL\Row\Schema;
use Flow\ETL\Tests\FlowTestCase;
use Flow\Parquet\ParquetFile\Schema as ParquetSchema;
use Flow\Parquet\ParquetFile\Schema\{FlatColumn, NestedColumn};
use PHPUnit\Framework\TestCase;

final class FlowToParquetSchemaTest extends TestCase
final class FlowToParquetSchemaTest extends FlowTestCase
{
public function test_convert_etl_entries_to_parquet_fields() : void
{
Expand Down
Loading
Loading