Skip to content

Commit

Permalink
adjust to phpunit 7
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Feb 12, 2020
1 parent 19138ce commit 59f12e1
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 128 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
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@ language: php
dist: trusty

php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4

env:
- PACKAGE_VERSION=high

sudo: false

cache:
Expand All @@ -22,7 +16,7 @@ cache:

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

before_script:
Expand Down
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.3 || ^3.4 || ^4.3 || ^5.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 59f12e1

Please sign in to comment.