Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Commit

Permalink
Updated tests to pass PHP8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bckp committed Dec 21, 2022
1 parent 7a2eeb1 commit eca22e6
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 31 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.PHONY: install qa cs csf phpstan tests coverage-clover coverage-html
.PHONY: help

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

install:
composer update
Expand Down
17 changes: 7 additions & 10 deletions tests/Cases/BulkConsumerTest.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,13 @@ final class BulkConsumerTest extends TestCase

protected function createLazyDeclarator(): LazyDeclarator
{
return new class extends LazyDeclarator{
public function __construct()
{
$this->queuesDataBag = \Mockery::spy(QueuesDataBag::class);
$this->exchangesDataBag = \Mockery::spy(ExchangesDataBag::class);
$this->queueDeclarator = \Mockery::spy(QueueDeclarator::class);
$this->exchangeDeclarator = \Mockery::spy(ExchangeDeclarator::class);
$this->connectionFactory = \Mockery::spy(ConnectionFactory::class);
}
};
return new LazyDeclarator(
\Mockery::spy(QueuesDataBag::class),
\Mockery::spy(ExchangesDataBag::class),
\Mockery::spy(QueueDeclarator::class),
\Mockery::spy(ExchangeDeclarator::class),
\Mockery::spy(ConnectionFactory::class),
);
}
}

Expand Down
17 changes: 7 additions & 10 deletions tests/Cases/ConsumerTest.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,13 @@ final class ConsumerTest extends TestCase

protected function createLazyDeclarator(): LazyDeclarator
{
return new class extends LazyDeclarator{
public function __construct()
{
$this->queuesDataBag = \Mockery::spy(QueuesDataBag::class);
$this->exchangesDataBag = \Mockery::spy(ExchangesDataBag::class);
$this->queueDeclarator = \Mockery::spy(QueueDeclarator::class);
$this->exchangeDeclarator = \Mockery::spy(ExchangeDeclarator::class);
$this->connectionFactory = \Mockery::spy(ConnectionFactory::class);
}
};
return new LazyDeclarator(
\Mockery::spy(QueuesDataBag::class),
\Mockery::spy(ExchangesDataBag::class),
\Mockery::spy(QueueDeclarator::class),
\Mockery::spy(ExchangeDeclarator::class),
\Mockery::spy(ConnectionFactory::class),
);
}

protected function createClient(int $numberOfMessages = 2)
Expand Down
17 changes: 7 additions & 10 deletions tests/Cases/ProducerTest.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -346,16 +346,13 @@ final class ProducerTest extends TestCase

protected function createLazyDeclarator(): LazyDeclarator
{
return new class extends LazyDeclarator {
public function __construct()
{
$this->queuesDataBag = \Mockery::spy(QueuesDataBag::class);
$this->exchangesDataBag = \Mockery::spy(ExchangesDataBag::class);
$this->queueDeclarator = \Mockery::spy(QueueDeclarator::class);
$this->exchangeDeclarator = \Mockery::spy(ExchangeDeclarator::class);
$this->connectionFactory = \Mockery::spy(ConnectionFactory::class);
}
};
return new LazyDeclarator(
\Mockery::spy(QueuesDataBag::class),
\Mockery::spy(ExchangesDataBag::class),
\Mockery::spy(QueueDeclarator::class),
\Mockery::spy(ExchangeDeclarator::class),
\Mockery::spy(ConnectionFactory::class),
);
}
}

Expand Down

0 comments on commit eca22e6

Please sign in to comment.