diff options
Diffstat (limited to 'tests/lib/AppFramework/Middleware')
3 files changed, 7 insertions, 4 deletions
diff --git a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php index 2c610736f4a..95729e286f9 100644 --- a/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/PasswordConfirmationMiddlewareTest.php @@ -89,7 +89,7 @@ class PasswordConfirmationMiddlewareTest extends TestCase { /** * @PasswordConfirmationRequired - * @dataProvider testProvider + * @dataProvider dataProvider */ public function testAnnotation($backend, $lastConfirm, $currentTime, $exception) { $this->reflector->reflect(__CLASS__, __FUNCTION__); @@ -116,7 +116,7 @@ class PasswordConfirmationMiddlewareTest extends TestCase { $this->assertSame($exception, $thrown); } - public function testProvider() { + public function dataProvider() { return [ ['foo', 2000, 4000, true], ['foo', 2000, 3000, false], diff --git a/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php index bd1568bcd6b..7784f55e84a 100644 --- a/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SameSiteCookieMiddlewareTest.php @@ -55,6 +55,7 @@ class SameSiteCookieMiddlewareTest extends TestCase { ->willReturn('/ocs/v2.php'); $this->middleware->beforeController($this->createMock(Controller::class), 'foo'); + $this->addToAssertionCount(1); } public function testBeforeControllerIndexHasAnnotation() { @@ -66,6 +67,7 @@ class SameSiteCookieMiddlewareTest extends TestCase { ->willReturn(true); $this->middleware->beforeController($this->createMock(Controller::class), 'foo'); + $this->addToAssertionCount(1); } public function testBeforeControllerIndexNoAnnotationPassingCheck() { @@ -80,6 +82,7 @@ class SameSiteCookieMiddlewareTest extends TestCase { ->willReturn(true); $this->middleware->beforeController($this->createMock(Controller::class), 'foo'); + $this->addToAssertionCount(1); } public function testBeforeControllerIndexNoAnnotationFailingCheck() { diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php index 274a2810cba..b68f0cb1981 100644 --- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php @@ -168,7 +168,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { // add assertion if everything should work fine otherwise phpunit will // complain if ($status === 0) { - $this->assertTrue(true); + $this->addToAssertionCount(1); } } @@ -265,7 +265,7 @@ class SecurityMiddlewareTest extends \Test\TestCase { if($shouldFail) { $this->expectException(SecurityException::class); } else { - $this->assertTrue(true); + $this->addToAssertionCount(1); } $this->reader->reflect(__CLASS__, $method); |