Skip to content

Commit

Permalink
Merge pull request #89 from aporat/master
Browse files Browse the repository at this point in the history
composer and phpunit changes
  • Loading branch information
shumkov committed Feb 13, 2014
2 parents 44ae80a + 881765b commit ac87d76
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Expand Up @@ -3,12 +3,14 @@ language: php
php:
- 5.3
- 5.4
- 5.5

before_script:
before_install:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev
- php composer.phar install --dev --no-interaction --prefer-source
- phpenv rehash

script:
- redis-server tests/redis.conf
- redis-server tests/redis2.conf
- cd tests; phpunit
- php vendor/bin/phpunit -c tests/phpunit.xml
22 changes: 8 additions & 14 deletions composer.json
@@ -1,6 +1,7 @@
{
"name": "geometria-lab/rediska",
"description": "Full-featured PHP client for key-value database Redis",
"keywords": ["redis", "zend", "sessions", "cache"],
"authors": [
{
"name": "Ivan Shumkov",
Expand All @@ -19,22 +20,15 @@
"email": "till@php.net"
}
],
"repositories": [
{
"type": "package",
"package": {
"name": "zendframework/zendframework",
"version": "1.11.11",
"dist": {
"url": "http://packages.zendframework.com/releases/ZendFramework-1.11.11/ZendFramework-1.11.11-minimal.zip",
"type": "zip"
}
}
}
],
"repositories" : [{
"type" : "vcs",
"url" : "https://github.com/zendframework/zf1.git"
}
],
"require": {},
"require-dev": {
"zendframework/zendframework": "1.11.*"
"phpunit/phpunit" : ">=3.7.11",
"zendframework/zendframework1" : ">=1.12.1"
},
"autoload": {
"psr-0":{
Expand Down
2 changes: 1 addition & 1 deletion tests/library/Rediska/Command/DiffSetsTest.php
Expand Up @@ -41,7 +41,7 @@ protected function _diffViaPhp()
}

protected $_sets = array(
'set1' => array(1, 3, 6, 4, 2, 'fds', 312, array('1a', 1, 2)),
'set1' => array(1, 3, 6, 4, 2, 'fds', 312, 'asdadaaa'),
'set2' => array(1, 5, 3, 7, 'aaa', 534),
'set3' => array('asdas', 1, 6, 3, 'y', 'aaa', 4)
);
Expand Down
2 changes: 1 addition & 1 deletion tests/library/Rediska/Command/IntersectSetsTest.php
Expand Up @@ -48,7 +48,7 @@ protected function _intersectViaPhp()
}

protected $_sets = array(
'set1' => array(1, 3, 6, 4, 2, 'fds', 312, array('1a', 1, 2)),
'set1' => array(1, 3, 6, 4, 2, 'fds', 312, 'asdadaaa'),
'set2' => array(1, 5, 3, 7, 'aaa', 534),
'set3' => array('asdas', 1, 6, 3, 'y', 'aaa', 4)
);
Expand Down
2 changes: 1 addition & 1 deletion tests/library/Rediska/Command/UnionSetsTest.php
Expand Up @@ -48,7 +48,7 @@ protected function _unionViaPhp()
}

protected $_sets = array(
'set1' => array(1, 3, 6, 4, 2, 'fds', 312, array('1a', 1, 2)),
'set1' => array(1, 3, 6, 4, 2, 'fds', 312, 'asdadaaa'),
'set2' => array(1, 5, 3, 7, 'aaa', 534),
'set3' => array('asdas', 1, 6, 3, 'y', 'aaa', 4)
);
Expand Down
4 changes: 2 additions & 2 deletions tests/library/Rediska/Zend/Cache/CacheTest.php
Expand Up @@ -130,8 +130,8 @@ public function testTouch()
$this->assertTrue($reply);
$meta = $this->cache->getMetadatas('test_id');
$lifetime = $meta['expire'] - time();
$this->assertTrue($lifetime > 290);
$this->assertEquals(300, $lifetime);
$this->assertTrue($lifetime >= 299);
$this->assertTrue($lifetime <= 301);
}

/**
Expand Down

0 comments on commit ac87d76

Please sign in to comment.