Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
PHPUnit update
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbundyra committed Sep 26, 2019
1 parent 168eb5c commit 3cd27f2
Show file tree
Hide file tree
Showing 27 changed files with 283 additions and 268 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"zendframework/zend-stdlib": "^2.7 || ^3.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2",
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.16",
"zendframework/zend-cache": "^2.6.1",
"zendframework/zend-coding-standard": "~1.0.0",
"zendframework/zend-config": "^2.6",
Expand Down
467 changes: 241 additions & 226 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/Filter/AlnumTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class AlnumTest extends TestCase
*
* @return void
*/
public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand Down
2 changes: 1 addition & 1 deletion test/Filter/AlphaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class AlphaTest extends TestCase
*
* @return void
*/
public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand Down
2 changes: 1 addition & 1 deletion test/Filter/NumberFormatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class NumberFormatTest extends TestCase
{
public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand Down
2 changes: 1 addition & 1 deletion test/Filter/NumberParseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class NumberParseTest extends TestCase
{
public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand Down
2 changes: 1 addition & 1 deletion test/ModuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class ModuleTest extends TestCase
{
public function setUp()
protected function setUp()
{
$this->module = new Module();
}
Expand Down
4 changes: 2 additions & 2 deletions test/Translator/Loader/GettextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class GettextTest extends TestCase
protected $originalLocale;
protected $originalIncludePath;

public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand All @@ -32,7 +32,7 @@ public function setUp()
set_include_path($this->testFilesDir . PATH_SEPARATOR . $this->testFilesDir . '/translations.phar');
}

public function tearDown()
protected function tearDown()
{
if (extension_loaded('intl')) {
Locale::setDefault($this->originalLocale);
Expand Down
4 changes: 2 additions & 2 deletions test/Translator/Loader/IniTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ class IniTest extends TestCase
protected $originalLocale;
protected $originalIncludePath;

public function setUp()
protected function setUp()
{
$this->testFilesDir = realpath(__DIR__ . '/../_files');

$this->originalIncludePath = get_include_path();
set_include_path($this->testFilesDir . PATH_SEPARATOR . $this->testFilesDir . '/translations.phar');
}

public function tearDown()
protected function tearDown()
{
set_include_path($this->originalIncludePath);
}
Expand Down
4 changes: 2 additions & 2 deletions test/Translator/Loader/PhpArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class PhpArrayTest extends TestCase
protected $originalLocale;
protected $originalIncludePath;

public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand All @@ -32,7 +32,7 @@ public function setUp()
set_include_path($this->testFilesDir . PATH_SEPARATOR . $this->testFilesDir . '/translations.phar');
}

public function tearDown()
protected function tearDown()
{
if (extension_loaded('intl')) {
Locale::setDefault($this->originalLocale);
Expand Down
4 changes: 2 additions & 2 deletions test/Translator/Loader/PhpMemoryArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class PhpMemoryArrayTest extends TestCase
protected $originalLocale;
protected $originalIncludePath;

public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand All @@ -29,7 +29,7 @@ public function setUp()
$this->testFilesDir = realpath(__DIR__ . '/../_files/phpmemoryarray');
}

public function tearDown()
protected function tearDown()
{
if (extension_loaded('intl')) {
Locale::setDefault($this->originalLocale);
Expand Down
4 changes: 2 additions & 2 deletions test/Translator/TranslatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class TranslatorTest extends TestCase
*/
protected $testFilesDir;

public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand All @@ -47,7 +47,7 @@ public function setUp()
$this->testFilesDir = __DIR__ . '/_files';
}

public function tearDown()
protected function tearDown()
{
if (extension_loaded('intl')) {
Locale::setDefault($this->originalLocale);
Expand Down
2 changes: 1 addition & 1 deletion test/Validator/AlnumTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AlnumTest extends TestCase
*
* @return void
*/
public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand Down
2 changes: 1 addition & 1 deletion test/Validator/AlphaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AlphaTest extends TestCase
*/
protected $validator;

public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand Down
4 changes: 2 additions & 2 deletions test/Validator/DateTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class DateTimeTest extends TestCase
*/
protected $timezone;

public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand All @@ -45,7 +45,7 @@ public function setUp()
]);
}

public function tearDown()
protected function tearDown()
{
if (extension_loaded('intl')) {
Locale::setDefault($this->locale);
Expand Down
6 changes: 3 additions & 3 deletions test/Validator/FloatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class FloatTest extends TestCase
*/
protected $locale;

public function setUp()
protected function setUp()
{
if (version_compare(PHP_VERSION, '7.0', '>=')) {
$this->markTestSkipped('Cannot test Float validator under PHP 7; reserved keyword');
Expand All @@ -39,7 +39,7 @@ public function setUp()
$this->locale = Locale::getDefault();
}

public function tearDown()
protected function tearDown()
{
if (extension_loaded('intl')) {
Locale::setDefault($this->locale);
Expand All @@ -48,7 +48,7 @@ public function tearDown()

public function testConstructorRaisesDeprecationNotice()
{
$this->setExpectedException('PHPUnit_Framework_Error_Deprecated');
$this->expectException('PHPUnit_Framework_Error_Deprecated');
new FloatValidator();
}
}
6 changes: 3 additions & 3 deletions test/Validator/IntTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class IntTest extends TestCase
*/
protected $locale;

public function setUp()
protected function setUp()
{
if (version_compare(PHP_VERSION, '7.0', '>=')) {
$this->markTestSkipped('Cannot test Int validator under PHP 7; reserved keyword');
Expand All @@ -39,7 +39,7 @@ public function setUp()
$this->locale = Locale::getDefault();
}

public function tearDown()
protected function tearDown()
{
if (extension_loaded('intl')) {
Locale::setDefault($this->locale);
Expand All @@ -48,7 +48,7 @@ public function tearDown()

public function testConstructorRaisesDeprecationNotice()
{
$this->setExpectedException('PHPUnit_Framework_Error_Deprecated');
$this->expectException('PHPUnit_Framework_Error_Deprecated');
new IntValidator();
}
}
4 changes: 2 additions & 2 deletions test/Validator/IsFloatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class IsFloatTest extends TestCase
*/
protected $locale;

public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand All @@ -37,7 +37,7 @@ public function setUp()
$this->validator = new IsFloatValidator(['locale' => 'en']);
}

public function tearDown()
protected function tearDown()
{
if (extension_loaded('intl')) {
Locale::setDefault($this->locale);
Expand Down
4 changes: 2 additions & 2 deletions test/Validator/IsIntTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class IsIntTest extends TestCase
*/
protected $locale;

public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand All @@ -37,7 +37,7 @@ public function setUp()
$this->validator = new IsIntValidator();
}

public function tearDown()
protected function tearDown()
{
if (extension_loaded('intl')) {
Locale::setDefault($this->locale);
Expand Down
2 changes: 1 addition & 1 deletion test/Validator/PhoneNumberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3049,7 +3049,7 @@ class PhoneNumberTest extends TestCase
],
];

public function setUp()
protected function setUp()
{
$this->validator = new PhoneNumber();
}
Expand Down
2 changes: 1 addition & 1 deletion test/Validator/PostCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PostCodeTest extends TestCase
*
* @return void
*/
public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand Down
2 changes: 1 addition & 1 deletion test/View/Helper/CurrencyFormatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class CurrencyFormatTest extends TestCase
*
* @return void
*/
public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand Down
4 changes: 2 additions & 2 deletions test/View/Helper/DateFormatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DateFormatTest extends TestCase
*
* @return void
*/
public function setUp()
protected function setUp()
{
if (! interface_exists('Zend\View\Helper\HelperInterface')) {
$this->markTestSkipped(
Expand All @@ -54,7 +54,7 @@ public function setUp()
*
* @return void
*/
public function tearDown()
protected function tearDown()
{
unset($this->helper);
}
Expand Down
4 changes: 2 additions & 2 deletions test/View/Helper/NumberFormatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class NumberFormatTest extends TestCase
*
* @return void
*/
public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand All @@ -46,7 +46,7 @@ public function setUp()
*
* @return void
*/
public function tearDown()
protected function tearDown()
{
unset($this->helper);
}
Expand Down
2 changes: 1 addition & 1 deletion test/View/Helper/PluralTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PluralTest extends TestCase
*
* @return void
*/
public function setUp()
protected function setUp()
{
if (! extension_loaded('intl')) {
$this->markTestSkipped('ext/intl not enabled');
Expand Down
4 changes: 2 additions & 2 deletions test/View/Helper/TranslatePluralTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class TranslatePluralTest extends TestCase
*
* @return void
*/
public function setUp()
protected function setUp()
{
$this->helper = new TranslatePluralHelper();
}
Expand All @@ -38,7 +38,7 @@ public function setUp()
*
* @return void
*/
public function tearDown()
protected function tearDown()
{
unset($this->helper);
}
Expand Down
4 changes: 2 additions & 2 deletions test/View/Helper/TranslateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class TranslateTest extends TestCase
*
* @return void
*/
public function setUp()
protected function setUp()
{
$this->helper = new TranslateHelper();
}
Expand All @@ -38,7 +38,7 @@ public function setUp()
*
* @return void
*/
public function tearDown()
protected function tearDown()
{
unset($this->helper);
}
Expand Down

0 comments on commit 3cd27f2

Please sign in to comment.