2022-01-26 14:16:12 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Wrm\Events\Tests\Unit\Domain\DestinationData;
|
|
|
|
|
|
|
|
use Wrm\Events\Domain\DestinationData\Import;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @covers \Wrm\Events\Domain\DestinationData\Import
|
|
|
|
*/
|
|
|
|
class ImportTest extends TestCase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
*/
|
|
|
|
public function canBeCreated(): void
|
|
|
|
{
|
|
|
|
$subject = new Import(
|
|
|
|
'',
|
|
|
|
0,
|
|
|
|
null,
|
2022-01-26 14:43:14 +01:00
|
|
|
'',
|
2022-01-26 14:16:12 +01:00
|
|
|
''
|
|
|
|
);
|
|
|
|
|
|
|
|
self::assertInstanceOf(
|
|
|
|
Import::class,
|
|
|
|
$subject
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
*/
|
|
|
|
public function returnsRestExperience(): void
|
|
|
|
{
|
|
|
|
$subject = new Import(
|
|
|
|
'experience',
|
|
|
|
0,
|
|
|
|
null,
|
2022-01-26 14:43:14 +01:00
|
|
|
'',
|
2022-01-26 14:16:12 +01:00
|
|
|
''
|
|
|
|
);
|
|
|
|
|
|
|
|
self::assertSame(
|
|
|
|
'experience',
|
|
|
|
$subject->getRestExperience()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
*/
|
|
|
|
public function returnsStoragePid(): void
|
|
|
|
{
|
|
|
|
$subject = new Import(
|
|
|
|
'',
|
|
|
|
20,
|
|
|
|
null,
|
2022-01-26 14:43:14 +01:00
|
|
|
'',
|
2022-01-26 14:16:12 +01:00
|
|
|
''
|
|
|
|
);
|
|
|
|
|
|
|
|
self::assertSame(
|
|
|
|
20,
|
|
|
|
$subject->getStoragePid()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
*/
|
|
|
|
public function returnsRegionUid(): void
|
|
|
|
{
|
|
|
|
$subject = new Import(
|
|
|
|
'',
|
|
|
|
0,
|
|
|
|
30,
|
2022-01-26 14:43:14 +01:00
|
|
|
'',
|
2022-01-26 14:16:12 +01:00
|
|
|
''
|
|
|
|
);
|
|
|
|
|
|
|
|
self::assertSame(
|
|
|
|
30,
|
|
|
|
$subject->getRegionUid()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
*/
|
|
|
|
public function returnsFilesFolder(): void
|
|
|
|
{
|
|
|
|
$subject = new Import(
|
|
|
|
'',
|
|
|
|
0,
|
|
|
|
null,
|
2022-01-26 14:43:14 +01:00
|
|
|
'test/folder',
|
|
|
|
''
|
2022-01-26 14:16:12 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
self::assertSame(
|
|
|
|
'test/folder',
|
|
|
|
$subject->getFilesFolder()
|
|
|
|
);
|
|
|
|
}
|
2022-01-26 14:43:14 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
*/
|
|
|
|
public function returnsSearchQuery(): void
|
|
|
|
{
|
|
|
|
$subject = new Import(
|
|
|
|
'',
|
|
|
|
0,
|
|
|
|
null,
|
|
|
|
'test/folder',
|
|
|
|
'name:"Test"'
|
|
|
|
);
|
|
|
|
|
|
|
|
self::assertSame(
|
|
|
|
'name:"Test"',
|
|
|
|
$subject->getSearchQuery()
|
|
|
|
);
|
|
|
|
}
|
2022-01-26 14:16:12 +01:00
|
|
|
}
|