Skip to content

Commit

Permalink
Merge pull request #62 from prolic/php_72
Browse files Browse the repository at this point in the history
test php 7.2 in travis
  • Loading branch information
prolic committed Nov 25, 2017
2 parents 73a777b + 529cc98 commit 4286672
Show file tree
Hide file tree
Showing 31 changed files with 36 additions and 33 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ language: php
php:
- 7.0
- 7.1
- 7.2

services:
- rabbitmq
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"psr/container": "^1.0",
"sandrokeil/interop-config": "^1.0",
"zendframework/zend-servicemanager": "^2.7 || ^3.0",
"phpunit/phpunit": "^5.6",
"phpunit/phpunit": "^6.4",
"phpspec/prophecy": "^1.6",
"satooshi/php-coveralls": "^1.0",
"php-amqplib/php-amqplib": "^2.7-rc1",
"malukenho/docheader": "^0.1.4",
"friendsofphp/php-cs-fixer": "2.0.0"
"friendsofphp/php-cs-fixer": "2.8.1"
},
"conflict": {
"sandrokeil/interop-config": "<1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/JsonRpc/JsonRpcResponseCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class JsonRpcResponseCollection implements ResponseCollection
/**
* @var Response[]
*/
private $responses;
private $responses = [];

/**
* @param Response $response
Expand Down
3 changes: 2 additions & 1 deletion tests/AbstractCallbackConsumerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@
use HumusTest\Amqp\Helper\CanCreateConnection;
use HumusTest\Amqp\Helper\DeleteOnTearDownTrait;
use HumusTest\Amqp\TestAsset\ArrayLogger;
use PHPUnit\Framework\TestCase;
use Psr\Log\NullLogger;

/**
* Class AbstractCallbackConsumer
* @package HumusTest\Amqp
*/
abstract class AbstractCallbackConsumerTest extends \PHPUnit_Framework_TestCase implements CanCreateConnection
abstract class AbstractCallbackConsumerTest extends TestCase implements CanCreateConnection
{
use DeleteOnTearDownTrait;

Expand Down
7 changes: 4 additions & 3 deletions tests/AbstractChannelRecoverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
use Humus\Amqp\Exchange;
use Humus\Amqp\Queue;
use HumusTest\Amqp\Helper\CanCreateConnection;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;

/**
* Class AbstractChannelRecoverTest
Expand Down Expand Up @@ -85,8 +85,9 @@ public function it_recovers()
$exchange1->publish('test message #' . $messagesCount, 'test');
}

$consume = 2; // NOTE: by default prefetch-count=3, so in consumer below we will ignore prefetched messages 3-5,
// and they will not seen by other consumers until we redeliver it.
$consume = 2;
// NOTE: by default prefetch-count=3, so in consumer below we will ignore prefetched messages 3-5,
// and they will not seen by other consumers until we redeliver it.

$queue1->consume(function (Envelope $envelope, Queue $queue) use (&$consume, &$result) {
$result[] = 'consumed ' . $envelope->getBody() . ' '
Expand Down
2 changes: 1 addition & 1 deletion tests/AbstractChannelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
use Humus\Amqp\Exchange;
use Humus\Amqp\Queue;
use HumusTest\Amqp\Helper\CanCreateConnection;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;

/**
* Class AbstractChannelTest
Expand Down
2 changes: 1 addition & 1 deletion tests/AbstractConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
use Humus\Amqp\Channel;
use Humus\Amqp\ConnectionOptions;
use HumusTest\Amqp\Helper\CanCreateConnection;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;

/**
* Class AbstractConnectionTest
Expand Down
2 changes: 1 addition & 1 deletion tests/AbstractExchangeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
use Humus\Amqp\Queue;
use HumusTest\Amqp\Helper\CanCreateConnection;
use HumusTest\Amqp\Helper\DeleteOnTearDownTrait;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;

/**
* Class AbstractExchangeTest
Expand Down
2 changes: 1 addition & 1 deletion tests/AbstractJsonProducerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
use Humus\Amqp\Queue;
use HumusTest\Amqp\Helper\CanCreateConnection;
use HumusTest\Amqp\Helper\DeleteOnTearDownTrait;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/AbstractPlainProducerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
use Humus\Amqp\Queue;
use HumusTest\Amqp\Helper\CanCreateConnection;
use HumusTest\Amqp\Helper\DeleteOnTearDownTrait;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;

/**
* Class AbstractPlainProducerTest
Expand Down
2 changes: 1 addition & 1 deletion tests/AbstractQueueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
use Humus\Amqp\Queue;
use HumusTest\Amqp\Helper\CanCreateConnection;
use HumusTest\Amqp\Helper\DeleteOnTearDownTrait;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;

/**
* Class AbstractQueueTest
Expand Down
2 changes: 1 addition & 1 deletion tests/Console/Command/PublishMessageCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
use Humus\Amqp\Console\Helper\ContainerHelper;
use Humus\Amqp\Constants;
use Humus\Amqp\Producer;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Helper\HelperSet;
Expand Down
2 changes: 1 addition & 1 deletion tests/Console/Command/PurgeQueueCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
use Humus\Amqp\Console\Command\PurgeQueueCommand;
use Humus\Amqp\Console\Helper\ContainerHelper;
use Humus\Amqp\Queue;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Tester\CommandTester;
Expand Down
2 changes: 1 addition & 1 deletion tests/Console/Command/SetupFabricCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Humus\Amqp\Console\Helper\ContainerHelper;
use Humus\Amqp\Exchange;
use Humus\Amqp\Queue;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Tester\CommandTester;
Expand Down
2 changes: 1 addition & 1 deletion tests/Console/Command/ShowCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

use Humus\Amqp\Console\Command\ShowCommand;
use Humus\Amqp\Console\Helper\ContainerHelper;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Tester\CommandTester;
Expand Down
2 changes: 1 addition & 1 deletion tests/Console/Command/StartCallbackConsumerCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
use Humus\Amqp\Console\Command\StartCallbackConsumerCommand;
use Humus\Amqp\Console\Helper\ContainerHelper;
use Humus\Amqp\Consumer;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Tester\CommandTester;
Expand Down
2 changes: 1 addition & 1 deletion tests/Console/Command/StartJsonRpcServerCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
use Humus\Amqp\Console\Command\StartJsonRpcServerCommand;
use Humus\Amqp\Console\Helper\ContainerHelper;
use Humus\Amqp\Consumer;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Tester\CommandTester;
Expand Down
2 changes: 1 addition & 1 deletion tests/Console/ConsumerRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

use Humus\Amqp\Console\ConsoleRunner;
use Humus\Amqp\Console\Helper\ContainerHelper;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Tester\ApplicationTester;
Expand Down
2 changes: 1 addition & 1 deletion tests/Console/Helper/ContainerHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace HumusTest\Amqp\Console\Helper;

use Humus\Amqp\Console\Helper\ContainerHelper;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Container/CallbackConsumerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
use Humus\Amqp\Connection;
use Humus\Amqp\Container\CallbackConsumerFactory;
use Humus\Amqp\Queue;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;

Expand Down
2 changes: 1 addition & 1 deletion tests/Container/ConnectionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Humus\Amqp\Driver\PhpAmqpLib\SocketConnection;
use Humus\Amqp\Driver\PhpAmqpLib\SslConnection;
use Humus\Amqp\Driver\PhpAmqpLib\StreamConnection;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Container/DriverFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

use Humus\Amqp\Container\DriverFactory;
use Humus\Amqp\Driver\Driver;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Container/ExchangeFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
use Humus\Amqp\Container\ExchangeFactory;
use Humus\Amqp\Exception;
use Humus\Amqp\Exchange;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Container/JsonRpcClientFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Humus\Amqp\Exchange;
use Humus\Amqp\JsonRpc\JsonRpcClient;
use Humus\Amqp\Queue;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Container/JsonRpcServerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Humus\Amqp\Exchange;
use Humus\Amqp\JsonRpc\JsonRpcServer;
use Humus\Amqp\Queue;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;

Expand Down
2 changes: 1 addition & 1 deletion tests/Container/ProducerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Humus\Amqp\Exchange;
use Humus\Amqp\JsonProducer;
use Humus\Amqp\PlainProducer;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Container/QueueFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Humus\Amqp\Exception;
use Humus\Amqp\Exchange;
use Humus\Amqp\Queue;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Psr\Container\ContainerInterface;

Expand Down
2 changes: 1 addition & 1 deletion tests/JsonRpc/AbstractJsonRpcClientAndServerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
use HumusTest\Amqp\Helper\CanCreateConnection;
use HumusTest\Amqp\Helper\DeleteOnTearDownTrait;
use HumusTest\Amqp\TestAsset\ArrayLogger;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Log\NullLogger;

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/JsonRpc/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

use Humus\Amqp\Exception\InvalidArgumentException;
use Humus\Amqp\JsonRpc\JsonRpcRequest;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;

/**
* Class RequestTest
Expand Down
2 changes: 1 addition & 1 deletion tests/JsonRpc/ResponseCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

use Humus\Amqp\JsonRpc\JsonRpcResponse;
use Humus\Amqp\JsonRpc\JsonRpcResponseCollection;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;

/**
* Class ResponseCollectionTest
Expand Down
2 changes: 1 addition & 1 deletion tests/JsonRpc/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
use Humus\Amqp\Exception\InvalidArgumentException;
use Humus\Amqp\JsonRpc\JsonRpcError;
use Humus\Amqp\JsonRpc\JsonRpcResponse;
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit\Framework\TestCase;

/**
* Class ResponseTest
Expand Down

0 comments on commit 4286672

Please sign in to comment.