diff options
author | Joas Schilling <coding@schilljs.com> | 2018-01-25 11:23:12 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-01-25 11:33:25 +0100 |
commit | bf2be08c9f3b6957a3327929a169eb6204e84cd0 (patch) | |
tree | 4738ade539309fea85c5db8e796783c2cdbc0438 /apps/dav | |
parent | 24af5c20bd65f8e657bcc495984234088c22e824 (diff) | |
download | nextcloud-server-bf2be08c9f3b6957a3327929a169eb6204e84cd0.tar.gz nextcloud-server-bf2be08c9f3b6957a3327929a169eb6204e84cd0.zip |
Fix risky tests without assertions
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/dav')
6 files changed, 8 insertions, 6 deletions
diff --git a/apps/dav/tests/unit/AppInfo/ApplicationTest.php b/apps/dav/tests/unit/AppInfo/ApplicationTest.php index bb6cfe67b4d..d4f53d360a9 100644 --- a/apps/dav/tests/unit/AppInfo/ApplicationTest.php +++ b/apps/dav/tests/unit/AppInfo/ApplicationTest.php @@ -61,6 +61,6 @@ class ApplicationTest extends TestCase { /** @var IManager|\PHPUnit_Framework_MockObject_MockObject $cm */ $cm = $this->createMock(IManager::class); $app->setupContactsProvider($cm, 'xxx'); - $this->assertTrue(true); + $this->addToAssertionCount(1); } } diff --git a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php index 2a01bd425c0..310433f0913 100644 --- a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php +++ b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php @@ -176,7 +176,7 @@ EOD; protected function assertAcl($principal, $privilege, $acl) { foreach($acl as $a) { if ($a['principal'] === $principal && $a['privilege'] === $privilege) { - $this->assertTrue(true); + $this->addToAssertionCount(1); return; } } @@ -190,7 +190,7 @@ EOD; return; } } - $this->assertTrue(true); + $this->addToAssertionCount(1); } protected function assertAccess($shouldHaveAcl, $principal, $privilege, $acl) { diff --git a/apps/dav/tests/unit/CalDAV/CalendarTest.php b/apps/dav/tests/unit/CalDAV/CalendarTest.php index dbdbf0dbafd..f467d46bf60 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarTest.php @@ -183,7 +183,7 @@ class CalendarTest extends TestCase { ->with(666, $propPatch); } $c->propPatch($propPatch); - $this->assertTrue(true); + $this->addToAssertionCount(1); } /** diff --git a/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php b/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php index cbde8c2ef68..91973eeff5d 100644 --- a/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php @@ -174,7 +174,7 @@ class CustomPropertiesBackendTest extends \Test\TestCase { ); // no exception, soft fail - $this->assertTrue(true); + $this->addToAssertionCount(1); } /** diff --git a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php index e72987ef02d..968cb548068 100644 --- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php @@ -345,7 +345,7 @@ class DirectoryTest extends \Test\TestCase { */ public function testMoveSuccess($source, $destination, $updatables, $deletables) { $this->moveTest($source, $destination, $updatables, $deletables); - $this->assertTrue(true); + $this->addToAssertionCount(1); } /** diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php index e1c4bc05dc1..ea520bca7e5 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php @@ -383,6 +383,8 @@ class FilesPluginTest extends TestCase { $propFind, $node ); + + $this->addToAssertionCount(1); } public function testUpdateProps() { |