Skip to content

Commit

Permalink
Merge pull request #13 from kokspflanze/php_tests
Browse files Browse the repository at this point in the history
tests phpunit update
  • Loading branch information
kokspflanze authored Jan 7, 2020
2 parents be0b1c4 + 553a594 commit fa84a32
Show file tree
Hide file tree
Showing 15 changed files with 118 additions and 67 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ install:
- COLUMNS=120 composer show

script:
- php ./vendor/bin/phpunit --configuration phpunit.xml.dist
- composer test
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"laminas/laminas-cache": "^2.8.2"
},
"require-dev": {
"phpunit/phpunit": "^7.5.18",
"phpunit/phpunit": "^8.4",
"laminas/laminas-console": "^2.8",
"laminas/laminas-db": "^2.5",
"doctrine/common": "^2.10",
Expand All @@ -59,5 +59,8 @@
"psr-4": {
"BjyAuthorizeTest\\": "tests/BjyAuthorizeTest"
}
},
"scripts": {
"test": "phpunit --colors=always --configuration phpunit.xml.dist"
}
}
154 changes: 101 additions & 53 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/BjyAuthorizeTest/Collector/RoleCollectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class RoleCollectorTest extends TestCase
*
* @covers \BjyAuthorize\Collector\RoleCollector::__construct
*/
public function setUp()
public function setUp(): void
{
$this->identityProvider = $this->createMock('BjyAuthorize\\Provider\\Identity\\ProviderInterface');
$this->collector = new RoleCollector($this->identityProvider);
Expand Down
2 changes: 1 addition & 1 deletion tests/BjyAuthorizeTest/Guard/ControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ControllerTest extends TestCase
*
* @covers \BjyAuthorize\Guard\Controller::__construct
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/BjyAuthorizeTest/Guard/RouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class RouteTest extends TestCase
*
* @covers \BjyAuthorize\Guard\Route::__construct
*/
public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class AuthenticationIdentityProviderTest extends TestCase
*
* @covers \BjyAuthorize\Provider\Identity\AuthenticationIdentityProvider::__construct
*/
public function setUp()
public function setUp(): void
{
$this->authService = $this->createMock('Laminas\Authentication\AuthenticationService');
$this->provider = new AuthenticationIdentityProvider($this->authService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ZfcUserZendDbTest extends TestCase
*
* @covers \BjyAuthorize\Provider\Identity\ZfcUserZendDb::__construct
*/
public function setUp()
public function setUp(): void
{
$this->authService = $this->createMock('Laminas\Authentication\AuthenticationService');
$this->userService = $this->getMockBuilder('ZfcUser\Service\User')->setMethods(['getAuthService'])->getMock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ObjectRepositoryProviderTest extends TestCase
/**
* @covers \BjyAuthorize\Provider\Role\ObjectRepositoryProvider::__construct
*/
protected function setUp()
protected function setUp(): void
{
$this->repository = $this->createMock('Doctrine\Common\Persistence\ObjectRepository');
$this->provider = new ObjectRepositoryProvider($this->repository);
Expand Down
2 changes: 1 addition & 1 deletion tests/BjyAuthorizeTest/Provider/Role/ZendDbTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ZendDbTest extends TestCase
/**
* @covers \BjyAuthorize\Provider\Role\ZendDb::__construct
*/
protected function setUp()
protected function setUp(): void
{
$this->serviceLocator = $this->createMock('Laminas\ServiceManager\ServiceLocatorInterface');
$this->provider = new ZendDb([], $this->serviceLocator);
Expand Down
Loading

0 comments on commit fa84a32

Please sign in to comment.