-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update dependencies like PHPUnit after official PHP 8.4 release (
#201) Signed-off-by: Christopher Klein <[email protected]>
- Loading branch information
Showing
100 changed files
with
1,234 additions
and
1,182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
{ | ||
"require-dev": { | ||
"10up/wp_mock": "1.0.1", | ||
"phpunit/phpunit": "9.6.20", | ||
"overtrue/phplint": "^2.3", | ||
"brianhenryie/strauss": "^0.11.1", | ||
"php-mock/php-mock-phpunit": "^2.10" | ||
}, | ||
"require": { | ||
"twig/twig": "3.18.0", | ||
"symfony/polyfill-mbstring": "1.20", | ||
"defuse/php-encryption": "2.0.3", | ||
"monolog/monolog": "^2.8.0" | ||
}, | ||
"scripts": { | ||
"strauss": [ | ||
"vendor/bin/strauss" | ||
], | ||
"twig-patcher": [ | ||
"php twig-patcher.php" | ||
], | ||
"post-install-cmd": [ | ||
"@strauss", | ||
"@twig-patcher" | ||
], | ||
"post-update-cmd": [ | ||
"@strauss", | ||
"@twig-patcher" | ||
] | ||
}, | ||
"extra": { | ||
"strauss": { | ||
"target_directory": "vendor-repackaged", | ||
"namespace_prefix": "Dreitier\\Nadi\\Vendor", | ||
"classmap_prefix": "Dreitier_Nadi_Vendor_", | ||
"constant_prefix": "DREITIER_NADI_VENDOR_" | ||
"require-dev": { | ||
"10up/wp_mock": "1.0.1", | ||
"phpunit/phpunit": "10.5.40 as 9.6.20", | ||
"overtrue/phplint": "^2.3", | ||
"brianhenryie/strauss": "^0.11.1", | ||
"php-mock/php-mock-phpunit": "^2.10" | ||
}, | ||
"require": { | ||
"twig/twig": "3.18.0", | ||
"symfony/polyfill-mbstring": "1.20", | ||
"defuse/php-encryption": "2.0.3", | ||
"monolog/monolog": "^2.8.0" | ||
}, | ||
"scripts": { | ||
"strauss": [ | ||
"vendor/bin/strauss" | ||
], | ||
"twig-patcher": [ | ||
"php twig-patcher.php" | ||
], | ||
"post-install-cmd": [ | ||
"@strauss", | ||
"@twig-patcher" | ||
], | ||
"post-update-cmd": [ | ||
"@strauss", | ||
"@twig-patcher" | ||
] | ||
}, | ||
"extra": { | ||
"strauss": { | ||
"target_directory": "vendor-repackaged", | ||
"namespace_prefix": "Dreitier\\Nadi\\Vendor", | ||
"classmap_prefix": "Dreitier_Nadi_Vendor_", | ||
"constant_prefix": "DREITIER_NADI_VENDOR_" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
* @author Danny Meißner <[email protected]> | ||
* @access | ||
*/ | ||
abstract class BasicIntegrationTest extends BasicTest | ||
class BasicIntegrationTestCase extends BasicTestCase | ||
{ | ||
// AD Connection Details | ||
/* @var Connection $connectionDetails */ | ||
|
@@ -268,7 +268,7 @@ protected function rollbackAdAfterConnectionIt($adLDAP) | |
*/ | ||
protected function createSyncToWordpressItUsersAttributes($numberOfUsers) | ||
{ | ||
$attributeCollector = array(); | ||
$attributeCollector = []; | ||
|
||
for ($i = 0; $i < $numberOfUsers; $i++) { | ||
$attributes = $this->attributes; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,10 @@ | |
* @author Tobias Hellmann <[email protected]> | ||
* @access private | ||
*/ | ||
abstract class BasicTest extends TestCase | ||
class BasicTestCase extends TestCase | ||
{ | ||
use PHPUnitHelper; | ||
|
||
public static function setUpBeforeClass(): void | ||
{ | ||
NadiLog::$isTestmode = true; | ||
|
@@ -73,7 +75,7 @@ public function createMockWithMethods($className, $methods) | |
return $this->getMockBuilder($className) | ||
->disableOriginalConstructor() | ||
->disableProxyingToOriginalMethods() | ||
->setMethods($methods) | ||
->addMethods($methods) | ||
->getMock(); | ||
} | ||
|
||
|
@@ -130,7 +132,7 @@ public function expects($class, $time, $method, $with, $will) | |
public function createAnonymousMock($methods) | ||
{ | ||
return $this->getMockBuilder('stdClass') | ||
->setMethods($methods) | ||
->addMethods($methods) | ||
->getMock(); | ||
} | ||
|
||
|
@@ -147,7 +149,7 @@ public function createMockedObject($class, $constructor, $methods) | |
{ | ||
return $this->getMockBuilder($class) | ||
->setConstructorArgs($constructor) | ||
->setMethods($methods) | ||
->onlyMethods($methods) | ||
->getMock(); | ||
} | ||
|
||
|
@@ -160,7 +162,7 @@ public function createMockedObject($class, $constructor, $methods) | |
* | ||
* @return mixed | ||
*/ | ||
protected function invokeMethod(&$object, $methodName, $parameters = array()) | ||
protected function invokeMethod(&$object, $methodName, $parameters = []) | ||
{ | ||
$reflector = new \ReflectionClass(get_class($object)); | ||
$method = $reflector->getMethod($methodName); | ||
|
@@ -175,7 +177,7 @@ protected function invokeMethod(&$object, $methodName, $parameters = array()) | |
* @param $name | ||
* @param array $parameters | ||
*/ | ||
protected function mockWordpressFunction($name, $parameters = array()) | ||
protected function mockWordpressFunction($name, $parameters = []) | ||
{ | ||
\WP_Mock::userFunction($name, $parameters); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
namespace Dreitier\Test; | ||
|
||
/** | ||
* @see https://github.com/sebastianbergmann/phpunit/issues/5320 | ||
* | ||
* @template T | ||
*/ | ||
interface CallableMock | ||
{ | ||
/** | ||
* @return T | ||
*/ | ||
public function __invoke(); | ||
|
||
/** | ||
* @return T | ||
*/ | ||
public function __call(string $name, array $arguments); | ||
} |
Oops, something went wrong.