Skip to content

Commit

Permalink
Merge branch 'qa/2'
Browse files Browse the repository at this point in the history
Close #2
  • Loading branch information
michalbundyra committed Jan 24, 2020
2 parents 24daf5e + 862bc08 commit f509556
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.phpunit.result.cache
/clover.xml
/composer.lock
/coveralls-upload.json
Expand Down
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ matrix:
- php: 7.3
env:
- DEPS=latest
- php: 7.4
env:
- DEPS=lowest
- php: 7.4
env:
- DEPS=latest

before_install:
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file, in reverse

### Added

- Nothing.
- [#2](https://github.com/mezzio/mezzio-authorization-rbac/pull/2) adds support for PHP 7.4.

### Changed

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@
"require-dev": {
"laminas/laminas-coding-standard": "~1.0.0",
"laminas/laminas-servicemanager": "^3.3",
"phpunit/phpunit": "^7.0.2"
"phpunit/phpunit": "^7.5.20 || ^8.5.2"
},
"conflict": {
"container-interop/container-interop": "<1.2.0"
"container-interop/container-interop": "<1.2.0",
"phpspec/prophecy": "<1.10.2"
},
"autoload": {
"psr-4": {
Expand Down
11 changes: 5 additions & 6 deletions test/ConfigProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ class ConfigProviderTest extends TestCase
/** @var ConfigProvider */
private $provider;

protected function setUp()
protected function setUp() : void
{
$this->provider = new ConfigProvider();
}

public function testInvocationReturnsArray()
{
$config = ($this->provider)();
$this->assertInternalType('array', $config);
$this->assertIsArray($config);
return $config;
}

Expand All @@ -43,11 +43,11 @@ public function testInvocationReturnsArray()
public function testReturnedArrayContainsDependencies(array $config)
{
$this->assertArrayHasKey('dependencies', $config);
$this->assertInternalType('array', $config['dependencies']);
$this->assertIsArray($config['dependencies']);
$this->assertArrayHasKey('factories', $config['dependencies']);

$factories = $config['dependencies']['factories'];
$this->assertInternalType('array', $factories);
$this->assertIsArray($factories);
$this->assertArrayHasKey(LaminasRbac::class, $factories);
}

Expand All @@ -74,8 +74,7 @@ public function testServicesDefinedInConfigProvider()
$dependencies = $this->provider->getDependencies();
foreach ($dependencies['factories'] as $name => $factory) {
$this->assertTrue($container->has($name), sprintf('Container does not contain service %s', $name));
$this->assertInternalType(
'object',
$this->assertIsObject(
$container->get($name),
sprintf('Cannot get service %s from container using factory %s', $name, $factory)
);
Expand Down
2 changes: 1 addition & 1 deletion test/LaminasRbacFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class LaminasRbacFactoryTest extends TestCase
/** @var ContainerInterface|ObjectProphecy */
private $container;

protected function setUp()
protected function setUp() : void
{
$this->container = $this->prophesize(ContainerInterface::class);
}
Expand Down
2 changes: 1 addition & 1 deletion test/LaminasRbacTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class LaminasRbacTest extends TestCase
/** @var LaminasRbacAssertionInterface|ObjectProphecy */
private $assertion;

protected function setUp()
protected function setUp() : void
{
$this->rbac = $this->prophesize(Rbac::class);
$this->assertion = $this->prophesize(LaminasRbacAssertionInterface::class);
Expand Down

0 comments on commit f509556

Please sign in to comment.