Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
php: [7.0, 7.1, 7.2, 7.3, 7.4]
php: [7.4]

steps:
- name: Checkout code
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
}
},
"require": {
"php": "^7.0",
"goaop/framework": "^2.2.0",
"phpunit/phpunit": "> 6.0.0",
"symfony/finder": ">=2.4 <6.0"
"php": "^7.4",
"goaop/framework": "^3.0",
"phpunit/phpunit": "^9.5",
"symfony/finder": ">=4.4 <6.0"
},
"require-dev": {
"codeception/codeception": "^4.0",
"codeception/verify": "^1.2",
"codeception/specify": "^1.0"
"codeception/codeception": "^4.1",
"codeception/verify": "^2.1",
"codeception/specify": "^1.4"
},
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/AspectMock/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class Kernel extends AspectKernel
{
public function init(array $options = [])
public function init(array $options = []): void
{
if (!isset($options['excludePaths'])) {
$options['excludePaths'] = [];
Expand Down
3 changes: 0 additions & 3 deletions tests/_data/php7.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
namespace Test\ns1;
class TestPhp7Class
{

//

public function stringSth(string $arg) {}
public function floatSth(float $arg) {}
public function boolSth(bool $arg) {}
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/ClassProxyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public function testSimpleClassValidations()
verify($class->hasMethod('setNothing'))->false();
verify($class->hasProperty('name'))->true();
verify($class->hasProperty('otherName'))->false();
verify($class->traits())->isEmpty();
verify($class->interfaces())->isEmpty();
verify($class->traits())->empty();
verify($class->interfaces())->empty();
verify($class->parent())->null();
}

Expand All @@ -28,8 +28,8 @@ public function testMegaClassValidations()
/** @var $class ClassProxy **/
verify($class->isDefined())->true();
verify($class->hasMethod('setName'))->false();
verify($class->traits())->contains('Codeception\Specify');
verify($class->interfaces())->contains('Iterator');
verify($class->traits())->arrayContains('Codeception\Specify');
verify($class->interfaces())->arrayContains('Iterator');
verify($class->parent())->equals('stdClass');
}

Expand Down
12 changes: 6 additions & 6 deletions tests/unit/FunctionInjectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function testReimplementFunc()
public function testVerifier()
{
$func = test::func('demo', 'strlen', 10);
expect(strlen('hello'))->equals(10);
verify(strlen('hello'))->equals(10);
$func->verifyInvoked();
$func->verifyInvoked(['hello']);
$func->verifyInvokedOnce();
Expand All @@ -86,7 +86,7 @@ public function testVerifier()
public function testVerifierFullyQualifiedNamespace()
{
$func = test::func('\demo', 'strlen', 10);
expect(strlen('hello'))->equals(10);
verify(strlen('hello'))->equals(10);
$func->verifyInvoked();
$func->verifyInvoked(['hello']);
$func->verifyInvokedOnce();
Expand All @@ -102,17 +102,17 @@ public function testFailedVerification()
{
$this->expectException(ExpectationFailedException::class);
$func = test::func('demo', 'strlen', function() { return 10; });
expect(strlen('hello'))->equals(10);
verify(strlen('hello'))->equals(10);
$func->verifyNeverInvoked();
}

public function testReferencedParameter()
{
$func = test::func('\demo', 'preg_match', 10);
expect(preg_match('@[0-9]+@', '1234', $match))->equals(10);
verify(preg_match('@[0-9]+@', '1234', $match))->equals(10);
test::clean();
expect(preg_match('@[0-9]+@', '1234#', $match))->equals(1);
expect($match[0])->equals('1234');
verify(preg_match('@[0-9]+@', '1234#', $match))->equals(1);
verify($match[0])->equals('1234');
}

}
2 changes: 1 addition & 1 deletion tests/unit/VerifierTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testVerifyInvocationClosures()
$empty = $params[1][0]; // second call, first arg

verify($info)->equals($args);
verify($empty)->isEmpty();
verify($empty)->empty();
};

$this->specify('closure was called', function() use ($user, $info, $matcher) {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/testDoubleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function testSpecUndefinedClass()
$this->assertFalse($class->isDefined());
$this->assertFalse($class->hasMethod('__toString'));
$this->assertFalse($class->hasMethod('edit'));
verify($class->interfaces())->isEmpty();
verify($class->interfaces())->empty();
$this->any = $class->make();
$this->any = $class->construct();

Expand Down