Skip to content

Commit

Permalink
PHPUnit 8+ added
Browse files Browse the repository at this point in the history
  • Loading branch information
JindrichPilar committed Dec 28, 2019
1 parent 78d2a4a commit 447ff09
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
vendor
composer.lock
composer.phar
.php_cs.cache
.php_cs.cache
.phpunit.result.cache
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"psr/simple-cache": "1.0.*"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"phpunit/phpunit": "^8.5",
"mockery/mockery": "^1.2",
"friendsofphp/php-cs-fixer": "^2.15",
"jakub-onderka/php-parallel-lint": "^1.0",
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="tests/bootstrap.php"
>
<testsuites>
Expand Down
5 changes: 3 additions & 2 deletions tests/Unit/CacheDecoratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
namespace Test\Skautis;

use Mockery\MockInterface;
use PHPUnit\Framework\TestCase;
use Skautis\User;
use Skautis\Wsdl\Decorator\Cache\CacheDecorator;
use Skautis\Wsdl\WebServiceInterface;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\Psr16Cache;

class CacheDecoratorTest extends \PHPUnit_Framework_TestCase
class CacheDecoratorTest extends TestCase
{

protected function tearDown()
protected function tearDown(): void
{
\Mockery::close();
}
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

namespace Test\Skautis;

use PHPUnit\Framework\TestCase;
use Skautis\Config;

class ConfigTest extends \PHPUnit_Framework_TestCase
class ConfigTest extends TestCase
{

public function testDefaultConfiguration(): void
Expand Down
5 changes: 3 additions & 2 deletions tests/Unit/HelpersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

namespace Test\Skautis;

use PHPUnit\Framework\TestCase;
use Skautis\Helpers;
use Skautis\User;

class HelpersTest extends \PHPUnit_Framework_TestCase
class HelpersTest extends TestCase
{

protected function tearDown()
protected function tearDown(): void
{
\Mockery::close();
}
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/SessionAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

namespace Test\Skautis;

use PHPUnit\Framework\TestCase;
use Skautis\SessionAdapter\AdapterInterface;
use Skautis\SessionAdapter\SessionAdapter;
use Skautis\SessionAdapter\FakeAdapter;

class SessionAdapterTest extends \PHPUnit_Framework_TestCase
class SessionAdapterTest extends TestCase
{


Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/SkautisQueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

namespace Test\Skautis;

use PHPUnit\Framework\TestCase;
use Skautis\SkautisQuery;

class SkautisQueryTest extends \PHPUnit_Framework_TestCase
class SkautisQueryTest extends TestCase
{
public function testQuery()
{
Expand Down
7 changes: 4 additions & 3 deletions tests/Unit/SkautisTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

namespace Test\Skautis;

use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Skautis\Config;
use Skautis\DynamicPropertiesDisabledException;
use Skautis\Skautis;
use Skautis\User;
use Skautis\Wsdl\WebServiceName;
use Skautis\Wsdl\WsdlManager;

class SkautisTest extends PHPUnit_Framework_TestCase
class SkautisTest extends TestCase
{

protected function tearDown()
protected function tearDown(): void
{
\Mockery::close();
}
Expand Down Expand Up @@ -104,6 +104,7 @@ public function testGetRegisterURL(): void {

public function testEventSetter(): void
{
$this->markTestSkipped();
//@TODO
}
}
5 changes: 3 additions & 2 deletions tests/Unit/UserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

namespace Test\Skautis;

use PHPUnit\Framework\TestCase;
use Skautis\User;
use Skautis\Wsdl\WsdlManager;
use Skautis\Wsdl\WebService;

class UserTest extends \PHPUnit_Framework_TestCase
class UserTest extends TestCase
{

protected function tearDown()
protected function tearDown(): void
{
\Mockery::close();
}
Expand Down
3 changes: 2 additions & 1 deletion tests/Unit/WebServiceFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

namespace Test\Skautis;

use PHPUnit\Framework\TestCase;
use Skautis\InvalidArgumentException;
use Skautis\Wsdl\WebServiceFactory;

class WebServiceFactoryTest extends \PHPUnit_Framework_TestCase
class WebServiceFactoryTest extends TestCase
{

public function testEmptyWSDL() {
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/WebServiceNameTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
namespace Test\Skautis;


use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Skautis\Wsdl\WebServiceName;

class WebServiceNameTest extends PHPUnit_Framework_TestCase
class WebServiceNameTest extends TestCase
{

public function testIsValid(): void
Expand Down
5 changes: 3 additions & 2 deletions tests/Unit/WebServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

namespace Test\Skautis;

use PHPUnit\Framework\TestCase;
use Skautis;
use Skautis\Wsdl\WebService;
use Skautis\Exception as SkautisException;
use Skautis\SkautisQuery;
use Skautis\Wsdl\WebServiceFactory;

class WebServiceTest extends \PHPUnit_Framework_TestCase
class WebServiceTest extends TestCase
{

protected $queries = [];
Expand All @@ -18,7 +19,7 @@ class WebServiceTest extends \PHPUnit_Framework_TestCase
*/
private $wsFactory;

protected function setUp()
protected function setUp(): void
{
$this->wsFactory = new WebServiceFactory();
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/WsdlManager/GetWebServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
namespace Test\Skautis;

use Mockery;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Skautis\Config;
use Skautis\Wsdl\WebServiceFactoryInterface;
use Skautis\Wsdl\WebServiceName;
use Skautis\Wsdl\WsdlManager;
use Skautis\Wsdl\WebServiceInterface;

class GetWebServiceTest extends PHPUnit_Framework_TestCase
class GetWebServiceTest extends TestCase
{

public function testGetWebService(): void
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/WsdlManager/IsMaintenanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,23 @@ function get_headers(string $url){
namespace Test\Skautis;

use Mockery;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Skautis\Config;
use Skautis\Wsdl\MaintenanceErrorException;
use Skautis\Wsdl\WebServiceFactoryInterface;
use Skautis\Wsdl\WebServiceName;
use Skautis\Wsdl\WsdlManager;
use Skautis\Wsdl\WebServiceInterface;

class IsMaintenanceTest extends PHPUnit_Framework_TestCase
class IsMaintenanceTest extends TestCase
{

/**
* @var WsdlManager
*/
private $manager;

protected function setUp()
protected function setUp(): void
{
$factory = Mockery::mock(WebServiceFactoryInterface::class);
$config = new Config('42');
Expand Down

0 comments on commit 447ff09

Please sign in to comment.