Skip to content

Commit

Permalink
Merge pull request #158 from jackalope/update-tests
Browse files Browse the repository at this point in the history
test with newer symfony versions and php 7.3 / 7.4
  • Loading branch information
dbu authored Feb 12, 2020
2 parents f5a5b60 + 59f12e1 commit a9fd112
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 133 deletions.
3 changes: 1 addition & 2 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
preset: psr2

enabled:
- long_array_syntax
- duplicate_semicolon
- duplicate_semicolon
19 changes: 7 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
language: php
# we seem to need the old trusty dist otherwise communication with jackrabbit fails
dist: trusty

php:
- 5.6
- 7.0
- 7.1
- 7.2

env:
- PACKAGE_VERSION=high
- 7.3
- 7.4

sudo: false

Expand All @@ -18,17 +16,14 @@ cache:

matrix:
include:
- php: 5.6
env: PACKAGE_VERSION=low
- php: 7.2
env: COMPOSER_OPTIONS=--prefer-lowest --prefer-stable

before_script:
- composer selfupdate
- if [[ "$PACKAGE_VERSION" == "high" ]]; then composer update --prefer-dist; fi
- if [[ "$PACKAGE_VERSION" == "low" ]]; then composer update --prefer-lowest --prefer-dist; fi
- composer update --prefer-dist ${COMPOSER_OPTIONS}
- ./bin/jackrabbit.sh

script: vendor/bin/phpunit

notifications:
irc: "irc.freenode.org#jackalope"

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

1.4 (unreleased)
----------------

* PHP requirement bumped to 7.2, tested with up to 7.4.

1.3
---

Expand Down
14 changes: 8 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,22 @@
}
],
"require": {
"php": "^5.6|^7.0",
"php": "^7.2",
"ext-xml":"*",
"ext-dom": "*",
"ext-curl":"*",
"phpcr/phpcr": "~2.1.2",
"phpcr/phpcr": "~2.1.5",
"phpcr/phpcr-utils": "^1.3.0",
"jackalope/jackalope": "^1.3.4"
"jackalope/jackalope": "^1.3.5"
},
"provide": {
"jackalope/jackalope-transport": "1.3.0"
},
"require-dev": {
"psr/log": "~1.0",
"phpcr/phpcr-api-tests": "2.1.19",
"symfony/console": "~2.0"
"phpcr/phpcr-api-tests": "2.1.21",
"symfony/console": "^2.3 || ^3.4 || ^4.3 || ^5.0",
"phpunit/phpunit": "^7.5"
},
"autoload": {
"psr-0": { "Jackalope\\": "src/" }
Expand All @@ -42,7 +44,7 @@
"bin": ["bin/jackalope", "bin/jackrabbit.sh"],
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
"dev-master": "1.x-dev"
}
}
}
17 changes: 7 additions & 10 deletions tests/Jackalope/RepositoryFactoryJackrabbitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,26 @@

namespace Jackalope;

use PHPCR\ConfigurationException;
use PHPUnit\Framework\TestCase;

class RepositoryFactoryJackrabbitTest extends TestCase
{
/**
* @expectedException \PHPCR\ConfigurationException
* @expectedExceptionMessage missing
*/
public function testMissingRequired()
public function testMissingRequired(): void
{
$factory = new RepositoryFactoryJackrabbit();

$this->expectException(ConfigurationException::class);
$this->expectExceptionMessage('missing');
$factory->getRepository(array());
}

/**
* @expectedException \PHPCR\ConfigurationException
* @expectedExceptionMessage unknown
*/
public function testExtraParameter()
public function testExtraParameter(): void
{
$factory = new RepositoryFactoryJackrabbit();

$this->expectException(ConfigurationException::class);
$this->expectExceptionMessage('unknown');
$factory->getRepository(array(
'jackalope.jackrabbit_uri' => 'http://localhost',
'unknown' => 'garbage',
Expand Down
Loading

0 comments on commit a9fd112

Please sign in to comment.