Skip to content

Commit

Permalink
Tweak QueueTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Leonovich committed Jun 24, 2015
1 parent e24b5e0 commit 74faee7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/Integration/QueueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,33 @@
abstract class QueueTest extends \PHPUnit_Framework_TestCase
{
/**
* @var \Tarantool
* @var Queue
*/
private static $tarantool;
protected $queue;

/**
* @var Queue
* @var \Tarantool
*/
protected $queue;
private static $client;

public static function setUpBeforeClass()
{
self::$tarantool = new \Tarantool(getenv('TNT_HOST'), getenv('TNT_PORT'));
self::$client = new \Tarantool(getenv('TNT_HOST'), getenv('TNT_PORT'));
}

public static function tearDownAfterClass()
{
self::$tarantool->close();
self::$tarantool = null;
self::$client->close();
self::$client = null;
}

protected function setUp()
{
$tubeType = $this->getTubeType();
$tubeName = uniqid(sprintf('t_%s_', $tubeType));

self::$tarantool->call('queue._create_tube', [$tubeName, $tubeType]);
$this->queue = new Queue(self::$tarantool, $tubeName);
self::$client->call('queue._create_tube', [$tubeName, $tubeType]);
$this->queue = new Queue(self::$client, $tubeName);
}

protected function tearDown()
Expand Down

0 comments on commit 74faee7

Please sign in to comment.