Skip to content

Commit 450e235

Browse files
committed
fix dynamic properties on tests
1 parent fa19a91 commit 450e235

4 files changed

Lines changed: 49 additions & 4 deletions

File tree

rector.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77
return RectorConfig::configure()
88
->withPaths([
99
__DIR__ . '/src',
10+
__DIR__ . '/tests',
1011
])
11-
->withRules([\Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector::class]);
12+
->withRules([
13+
\Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector::class,
14+
]);

tests/Html/FormBuilderTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@
1212
class FormBuilderTest extends BackwardCompatibleTestCase
1313
{
1414

15+
private FormBuilder $formBuilder;
16+
1517
/**
1618
* Setup the test environment.
1719
*/
1820
protected function setUp(): void
1921
{
20-
$this->urlGenerator = new UrlGenerator(new RouteCollection, Request::create('/foo', 'GET'));
21-
$this->htmlBuilder = new HtmlBuilder($this->urlGenerator);
22-
$this->formBuilder = new FormBuilder($this->htmlBuilder, $this->urlGenerator, '');
22+
$urlGenerator = new UrlGenerator(new RouteCollection, Request::create('/foo', 'GET'));
23+
$htmlBuilder = new HtmlBuilder($urlGenerator);
24+
$this->formBuilder = new FormBuilder($htmlBuilder, $urlGenerator, '');
2325
}
2426

2527

tests/Queue/QueueSqsJobTest.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,32 @@
1212
class QueueSqsJobTest extends BackwardCompatibleTestCase
1313
{
1414

15+
private string $key;
16+
private string $secret;
17+
private string $service;
18+
private string $region;
19+
private string $account;
20+
private string $queueName;
21+
private string $baseUrl;
22+
private Credentials $credentials;
23+
private SignatureV4 $signature;
24+
private Collection $config;
25+
private string $queueUrl;
26+
private \PHPUnit\Framework\MockObject\MockObject $mockedSqsClient;
27+
private $mockedContainer;
28+
private string $mockedJob;
29+
/**
30+
* @var string[]
31+
*/
32+
private array $mockedData;
33+
/**
34+
* @var bool|non-empty-string
35+
*/
36+
private string|bool $mockedPayload;
37+
private string $mockedMessageId;
38+
private string $mockedReceiptHandle;
39+
private array $mockedJobData;
40+
1541
protected function setUp(): void
1642
{
1743
$this->markTestSkipped();

tests/Queue/QueueSqsQueueTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,20 @@
1111
class QueueSqsQueueTest extends BackwardCompatibleTestCase
1212
{
1313

14+
private $sqs;
15+
private string $account;
16+
private string $queueName;
17+
private string $baseUrl;
18+
private string $queueUrl;
19+
private string $mockedJob;
20+
private array $mockedData;
21+
private string|false $mockedPayload;
22+
private int $mockedDelay;
23+
private string $mockedMessageId;
24+
private string $mockedReceiptHandle;
25+
private Model $mockedSendMessageResponseModel;
26+
private Model $mockedReceiveMessageResponseModel;
27+
1428
protected function tearDown(): void
1529
{
1630
m::close();

0 commit comments

Comments
 (0)