Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/303299
Change subject: Config shortcut for queue testing. ...................................................................... Config shortcut for queue testing. This'll be nice for testing the Civi queue consumers Change-Id: Ie82fd9c50afbde3d8ee7c8a1a5fdfaa285d246d4 --- M Tests/QueueConsumerTest.php A Tests/QueueTestConfiguration.php 2 files changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/99/303299/1 diff --git a/Tests/QueueConsumerTest.php b/Tests/QueueConsumerTest.php index 43993d7..871b2ed 100644 --- a/Tests/QueueConsumerTest.php +++ b/Tests/QueueConsumerTest.php @@ -5,6 +5,7 @@ use Exception; use PDO; use PHPQueue\Interfaces\FifoQueueStore; +use SmashPig\Core\Context; use SmashPig\Core\DataStores\DamagedDatabase; use SmashPig\Core\QueueConsumers\BaseQueueConsumer; @@ -21,7 +22,7 @@ public function setUp() { parent::setUp(); - $this->setConfig( 'default', __DIR__ . '/data/config_queue.yaml' ); + Context::initWithLogger( new QueueTestConfiguration() ); $this->queue = BaseQueueConsumer::getQueue( 'test' ); $this->queue->createTable( 'test' ); $this->damaged = DamagedDatabase::get()->getDatabase(); diff --git a/Tests/QueueTestConfiguration.php b/Tests/QueueTestConfiguration.php new file mode 100644 index 0000000..80fafc0 --- /dev/null +++ b/Tests/QueueTestConfiguration.php @@ -0,0 +1,12 @@ +<?php namespace SmashPig\Tests; + +use \SmashPig\Core\Configuration; + +class QueueTestConfiguration extends Configuration { + public function __construct() { + parent::__construct( + 'default', + __DIR__ . '/data/config_queue.yaml' + ); + } +} -- To view, visit https://gerrit.wikimedia.org/r/303299 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie82fd9c50afbde3d8ee7c8a1a5fdfaa285d246d4 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: Ejegg <eeggles...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits