Skip to content

Commit

Permalink
Merge pull request #17 from pr0head/master
Browse files Browse the repository at this point in the history
Changed the required version of PHP to >=7.0, changed the tests for the PHPUnit of version 6
  • Loading branch information
misterion committed Feb 7, 2018
2 parents 3e77b55 + 5bc2cab commit d3cd69e
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: php

php:
- 5.6
- 7.0

services:
- rabbitmq
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"ext-amqp": ">=1.4.0"
},
"require": {
"php": ">=5.4.0",
"php": ">=7.0.0",
"misterion/ko-process": "~0.4",
"symfony/yaml": "^3.0",
"ulrichsg/getopt-php": "~2.3.0"
"ulrichsg/getopt-php": "~3.1.0"
},
"require-dev": {
"phpunit/phpunit": "~6.0",
Expand Down
18 changes: 9 additions & 9 deletions src/Ko/Worker/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
use Ko\Process;
use Ko\ProcessManager;
use Symfony\Component\Yaml\Yaml;
use Ulrichsg\Getopt\Getopt;
use Ulrichsg\Getopt\Option;
use GetOpt\GetOpt;
use GetOpt\Option;

/**
* Class Application
Expand All @@ -55,7 +55,7 @@ class Application
const FAILED_EXIT = 0;

/**
* @var Getopt
* @var GetOpt
*/
protected $opts;

Expand Down Expand Up @@ -126,18 +126,18 @@ public function setName($name)

protected function buildCommandLineOptions()
{
$this->opts = new Getopt(
$this->opts = new GetOpt(
[
(new Option('w', 'workers', Getopt::REQUIRED_ARGUMENT))
(new Option('w', 'workers', GetOpt::REQUIRED_ARGUMENT))
->setDefaultValue(1)
->setDescription('Worker process count'),
(new Option('c', 'config', Getopt::REQUIRED_ARGUMENT))
(new Option('c', 'config', GetOpt::REQUIRED_ARGUMENT))
->setDescription('Worker configuration file'),
(new Option('q', 'queue', Getopt::REQUIRED_ARGUMENT))
(new Option('q', 'queue', GetOpt::REQUIRED_ARGUMENT))
->setDescription('Consumer queue name'),
(new Option('d', 'demonize', Getopt::NO_ARGUMENT))
(new Option('d', 'demonize', GetOpt::NO_ARGUMENT))
->setDescription('Run application as daemon'),
(new Option('f', 'fork', Getopt::NO_ARGUMENT))
(new Option('f', 'fork', GetOpt::NO_ARGUMENT))
->setDescription('Use fork instead of spawn child process'),
]
);
Expand Down
3 changes: 2 additions & 1 deletion tests/Ko/AmqpBrokerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* @license MIT http://opensource.org/licenses/MIT
*/
use Ko\AmqpBroker;
use PHPUnit\Framework\TestCase;

/**
* Class AmqpBrokerTest
Expand All @@ -38,7 +39,7 @@
* @author Vadim Sabirov <pr0head@gmail.com>
* @version 1.0.0
*/
class AmqpBrokerTest extends PHPUnit_Framework_TestCase
class AmqpBrokerTest extends TestCase
{
/**
* @expectedException \InvalidArgumentException
Expand Down
3 changes: 2 additions & 1 deletion tests/Ko/RabbitMq/ConnectionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
* @license MIT http://opensource.org/licenses/MIT
*/
use Ko\RabbitMq\ConnectionFactory;
use PHPUnit\Framework\TestCase;

class ConnectionFactoryTest extends PHPUnit_Framework_TestCase
class ConnectionFactoryTest extends TestCase
{
/**
* @expectedException \InvalidArgumentException
Expand Down
3 changes: 2 additions & 1 deletion tests/Ko/RabbitMq/ConsumerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
* @license MIT http://opensource.org/licenses/MIT
*/
use Ko\RabbitMq\Consumer;
use PHPUnit\Framework\TestCase;

class ConsumerTest extends PHPUnit_Framework_TestCase
class ConsumerTest extends TestCase
{
/**
* @var \PHPUnit_Framework_MockObject_MockObject
Expand Down
3 changes: 2 additions & 1 deletion tests/Ko/RabbitMq/ProducerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
* @license MIT http://opensource.org/licenses/MIT
*/
use Ko\RabbitMq\Producer;
use PHPUnit\Framework\TestCase;

class ProducerTest extends PHPUnit_Framework_TestCase
class ProducerTest extends TestCase
{
/**
* @var \PHPUnit_Framework_MockObject_MockObject
Expand Down
Binary file modified tests/Ko/Worker/ApplicationTest.php
Binary file not shown.

0 comments on commit d3cd69e

Please sign in to comment.