Chore(deps-dev): Bump nextcloud/coding-standard from 1.2.1 to 1.2.3
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 1.2.1 to 1.2.3. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v1.2.1...v1.2.3) --- updated-dependencies: - dependency-name: nextcloud/coding-standard dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
Julius Härtl
parent
3daad1b9bc
commit
ba3e97b73d
@@ -31,11 +31,11 @@ use OCP\Server;
|
||||
* @group DB
|
||||
*/
|
||||
class BoardDatabaseTest extends \Test\TestCase {
|
||||
public const TEST_USER1 = "test-share-user1";
|
||||
public const TEST_USER2 = "test-share-user2";
|
||||
public const TEST_USER3 = "test-share-user3";
|
||||
public const TEST_USER4 = "test-share-user4";
|
||||
public const TEST_GROUP1 = "test-share-group1";
|
||||
public const TEST_USER1 = 'test-share-user1';
|
||||
public const TEST_USER2 = 'test-share-user2';
|
||||
public const TEST_USER3 = 'test-share-user3';
|
||||
public const TEST_USER4 = 'test-share-user4';
|
||||
public const TEST_GROUP1 = 'test-share-group1';
|
||||
|
||||
/** @var BoardService */
|
||||
private $boardService;
|
||||
|
||||
@@ -71,7 +71,7 @@ class BoardContext implements Context {
|
||||
break;
|
||||
}
|
||||
}
|
||||
Assert::assertNotNull($id, "Could not find board named ".$boardName);
|
||||
Assert::assertNotNull($id, 'Could not find board named '.$boardName);
|
||||
} else {
|
||||
$id = $this->board['id'];
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class SearchContext implements Context {
|
||||
/**
|
||||
* @When /^searching for "([^"]*)" in comments in unified search$/
|
||||
* @param string $term
|
||||
* https://cloud.nextcloud.com/ocs/v2.php/search/providers/talk-conversations/search?term=an&from=%2Fapps%2Fdashboard%2F
|
||||
* https://cloud.nextcloud.com/ocs/v2.php/search/providers/talk-conversations/search?term=an&from=%2Fapps%2Fdashboard%2F
|
||||
*/
|
||||
public function searchingForComments(string $term) {
|
||||
$this->requestContext->sendOCSRequest('GET', '/search/providers/search-deck-comment/search?term=' . urlencode($term), []);
|
||||
|
||||
@@ -32,7 +32,7 @@ class SessionContext implements Context {
|
||||
'boardId' => $board['id'],
|
||||
]);
|
||||
$res = json_decode((string)$this->getResponse()->getBody(), true);
|
||||
Assert::assertArrayHasKey('token', $res['ocs']['data'], "session creation did not respond with a token");
|
||||
Assert::assertArrayHasKey('token', $res['ocs']['data'], 'session creation did not respond with a token');
|
||||
|
||||
// store token
|
||||
$user = $this->serverContext->getCurrentUser();
|
||||
@@ -44,7 +44,7 @@ class SessionContext implements Context {
|
||||
*/
|
||||
public function theResponseShouldHaveActiveSessions($length) {
|
||||
$board = $this->boardContext->getLastUsedBoard();
|
||||
Assert::assertEquals($length, count($board['activeSessions']), "unexpected count of active sessions");
|
||||
Assert::assertEquals($length, count($board['activeSessions']), 'unexpected count of active sessions');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -52,7 +52,7 @@ class SessionContext implements Context {
|
||||
*/
|
||||
public function theUserShouldBeInTheListOfActiveSessions($user) {
|
||||
$board = $this->boardContext->getLastUsedBoard();
|
||||
Assert::assertContains($user, $board['activeSessions'], "user is not found in the list of active sessions");
|
||||
Assert::assertContains($user, $board['activeSessions'], 'user is not found in the list of active sessions');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -67,7 +67,7 @@ class SessionContext implements Context {
|
||||
|
||||
$user = $this->serverContext->getCurrentUser();
|
||||
$token = $this->tokens[$user];
|
||||
Assert::assertNotEmpty($token, "no token for the user found");
|
||||
Assert::assertNotEmpty($token, 'no token for the user found');
|
||||
$this->requestContext->sendOCSRequest('POST', '/apps/deck/api/v1.0/session/close', [
|
||||
'boardId' => $board['id'],
|
||||
'token' => $token
|
||||
|
||||
@@ -88,8 +88,8 @@ class UserExportTest extends \Test\TestCase {
|
||||
|
||||
public function getComment($id) {
|
||||
$comment = new Comment();
|
||||
$comment->setActor("users", "admin");
|
||||
$comment->setMessage("fake comment" . $id);
|
||||
$comment->setActor('users', 'admin');
|
||||
$comment->setMessage('fake comment' . $id);
|
||||
return $comment;
|
||||
}
|
||||
public function testExecute() {
|
||||
|
||||
@@ -27,7 +27,7 @@ class AclTest extends \Test\TestCase {
|
||||
private function createAclUser() {
|
||||
$acl = new Acl();
|
||||
$acl->setId(1);
|
||||
$acl->setParticipant("admin");
|
||||
$acl->setParticipant('admin');
|
||||
$acl->setType(Acl::PERMISSION_TYPE_USER);
|
||||
$acl->setBoardId(1);
|
||||
$acl->setPermissionEdit(true);
|
||||
@@ -39,7 +39,7 @@ class AclTest extends \Test\TestCase {
|
||||
private function createAclGroup() {
|
||||
$acl = new Acl();
|
||||
$acl->setId(1);
|
||||
$acl->setParticipant("administrators");
|
||||
$acl->setParticipant('administrators');
|
||||
$acl->setType(Acl::PERMISSION_TYPE_GROUP);
|
||||
$acl->setBoardId(1);
|
||||
$acl->setPermissionEdit(true);
|
||||
|
||||
@@ -28,7 +28,7 @@ class AttachmentTest extends \Test\TestCase {
|
||||
$attachment = new Attachment();
|
||||
$attachment->setId(1);
|
||||
$attachment->setCardId(123);
|
||||
$attachment->setData("blob");
|
||||
$attachment->setData('blob');
|
||||
$attachment->setCreatedBy('admin');
|
||||
$attachment->setType('deck_file');
|
||||
return $attachment;
|
||||
|
||||
@@ -8,9 +8,9 @@ class BoardTest extends TestCase {
|
||||
private function createBoard() {
|
||||
$board = new Board();
|
||||
$board->setId(1);
|
||||
$board->setTitle("My Board");
|
||||
$board->setOwner("admin");
|
||||
$board->setColor("000000");
|
||||
$board->setTitle('My Board');
|
||||
$board->setOwner('admin');
|
||||
$board->setColor('000000');
|
||||
$board->setArchived(false);
|
||||
// TODO: relation shared labels acl
|
||||
return $board;
|
||||
@@ -20,9 +20,9 @@ class BoardTest extends TestCase {
|
||||
$board->setUsers(['user1', 'user2']);
|
||||
$this->assertEquals([
|
||||
'id' => 1,
|
||||
'title' => "My Board",
|
||||
'owner' => "admin",
|
||||
'color' => "000000",
|
||||
'title' => 'My Board',
|
||||
'owner' => 'admin',
|
||||
'color' => '000000',
|
||||
'labels' => [],
|
||||
'permissions' => [],
|
||||
'stacks' => [],
|
||||
@@ -44,9 +44,9 @@ class BoardTest extends TestCase {
|
||||
self::assertNull($board->getLabels());
|
||||
$this->assertEquals([
|
||||
'id' => 1,
|
||||
'title' => "My Board",
|
||||
'owner' => "admin",
|
||||
'color' => "000000",
|
||||
'title' => 'My Board',
|
||||
'owner' => 'admin',
|
||||
'color' => '000000',
|
||||
'labels' => [],
|
||||
'permissions' => [],
|
||||
'stacks' => [],
|
||||
@@ -63,13 +63,13 @@ class BoardTest extends TestCase {
|
||||
|
||||
public function testSetLabels() {
|
||||
$board = $this->createBoard();
|
||||
$board->setLabels(["foo", "bar"]);
|
||||
$board->setLabels(['foo', 'bar']);
|
||||
$this->assertEquals([
|
||||
'id' => 1,
|
||||
'title' => "My Board",
|
||||
'owner' => "admin",
|
||||
'color' => "000000",
|
||||
'labels' => ["foo", "bar"],
|
||||
'title' => 'My Board',
|
||||
'owner' => 'admin',
|
||||
'color' => '000000',
|
||||
'labels' => ['foo', 'bar'],
|
||||
'permissions' => [],
|
||||
'stacks' => [],
|
||||
'deletedAt' => 0,
|
||||
@@ -95,9 +95,9 @@ class BoardTest extends TestCase {
|
||||
$board->setShared(1);
|
||||
$this->assertEquals([
|
||||
'id' => 1,
|
||||
'title' => "My Board",
|
||||
'owner' => "admin",
|
||||
'color' => "000000",
|
||||
'title' => 'My Board',
|
||||
'owner' => 'admin',
|
||||
'color' => '000000',
|
||||
'labels' => [],
|
||||
'permissions' => [],
|
||||
'stacks' => [],
|
||||
|
||||
@@ -32,13 +32,13 @@ class CardTest extends TestCase {
|
||||
private function createCard() {
|
||||
$card = new Card();
|
||||
$card->setId(1);
|
||||
$card->setTitle("My Card");
|
||||
$card->setDescription("a long description");
|
||||
$card->setTitle('My Card');
|
||||
$card->setDescription('a long description');
|
||||
$card->setStackId(1);
|
||||
$card->setType('text');
|
||||
$card->setLastModified(234);
|
||||
$card->setCreatedAt(123);
|
||||
$card->setOwner("admin");
|
||||
$card->setOwner('admin');
|
||||
$card->setOrder(12);
|
||||
$card->setArchived(false);
|
||||
$card->setDone(null);
|
||||
@@ -68,8 +68,8 @@ class CardTest extends TestCase {
|
||||
$card = $this->createCard();
|
||||
$this->assertEquals([
|
||||
'id' => 1,
|
||||
'title' => "My Card",
|
||||
'description' => "a long description",
|
||||
'title' => 'My Card',
|
||||
'description' => 'a long description',
|
||||
'type' => 'text',
|
||||
'lastModified' => 234,
|
||||
'createdAt' => 123,
|
||||
@@ -96,8 +96,8 @@ class CardTest extends TestCase {
|
||||
$card->setLabels([]);
|
||||
$this->assertEquals([
|
||||
'id' => 1,
|
||||
'title' => "My Card",
|
||||
'description' => "a long description",
|
||||
'title' => 'My Card',
|
||||
'description' => 'a long description',
|
||||
'type' => 'text',
|
||||
'lastModified' => 234,
|
||||
'createdAt' => 123,
|
||||
@@ -126,8 +126,8 @@ class CardTest extends TestCase {
|
||||
$card->setLabels([]);
|
||||
$this->assertEquals([
|
||||
'id' => 1,
|
||||
'title' => "My Card",
|
||||
'description' => "a long description",
|
||||
'title' => 'My Card',
|
||||
'description' => 'a long description',
|
||||
'type' => 'text',
|
||||
'lastModified' => 234,
|
||||
'createdAt' => 123,
|
||||
|
||||
@@ -29,8 +29,8 @@ class LabelTest extends TestCase {
|
||||
private function createLabel() {
|
||||
$label = new Label();
|
||||
$label->setId(1);
|
||||
$label->setTitle("My Label");
|
||||
$label->setColor("000000");
|
||||
$label->setTitle('My Label');
|
||||
$label->setColor('000000');
|
||||
return $label;
|
||||
}
|
||||
public function testJsonSerializeBoard() {
|
||||
|
||||
@@ -27,7 +27,7 @@ class StackTest extends \Test\TestCase {
|
||||
private function createStack() {
|
||||
$board = new Stack();
|
||||
$board->setId(1);
|
||||
$board->setTitle("My Stack");
|
||||
$board->setTitle('My Stack');
|
||||
$board->setBoardId(1);
|
||||
$board->setOrder(1);
|
||||
return $board;
|
||||
@@ -36,7 +36,7 @@ class StackTest extends \Test\TestCase {
|
||||
$stack = $this->createStack();
|
||||
$this->assertEquals([
|
||||
'id' => 1,
|
||||
'title' => "My Stack",
|
||||
'title' => 'My Stack',
|
||||
'order' => 1,
|
||||
'boardId' => 1,
|
||||
'deletedAt' => 0,
|
||||
@@ -45,15 +45,15 @@ class StackTest extends \Test\TestCase {
|
||||
], $stack->jsonSerialize());
|
||||
}
|
||||
public function testJsonSerializeWithCards() {
|
||||
$cards = ["foo", "bar"];
|
||||
$cards = ['foo', 'bar'];
|
||||
$stack = $this->createStack();
|
||||
$stack->setCards($cards);
|
||||
$this->assertEquals([
|
||||
'id' => 1,
|
||||
'title' => "My Stack",
|
||||
'title' => 'My Stack',
|
||||
'order' => 1,
|
||||
'boardId' => 1,
|
||||
'cards' => ["foo", "bar"],
|
||||
'cards' => ['foo', 'bar'],
|
||||
'deletedAt' => 0,
|
||||
'lastModified' => 0,
|
||||
'ETag' => $stack->getETag(),
|
||||
|
||||
@@ -69,8 +69,8 @@ class ExceptionMiddlewareTest extends \Test\TestCase {
|
||||
public function testAfterException($exception, $status, $message) {
|
||||
$result = $this->exceptionMiddleware->afterException($this->controller, 'bar', $exception);
|
||||
$expected = new JSONResponse([
|
||||
"status" => $status,
|
||||
"message" => $message
|
||||
'status' => $status,
|
||||
'message' => $message
|
||||
], $status);
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class NotificationHelperTest extends \Test\TestCase {
|
||||
protected $cardMapper;
|
||||
/** @var BoardMapper|MockObject */
|
||||
protected $boardMapper;
|
||||
/** @var AssignmentMapper|MockObject */
|
||||
/** @var AssignmentMapper|MockObject */
|
||||
protected $assignedUsersMapper;
|
||||
/** @var PermissionService|MockObject */
|
||||
protected $permissionService;
|
||||
|
||||
@@ -78,7 +78,7 @@ class AssignmentServiceTest extends TestCase {
|
||||
*/
|
||||
private $assignmentService;
|
||||
/**
|
||||
* @var AssignmentServiceValidator
|
||||
* @var AssignmentServiceValidator
|
||||
*/
|
||||
private $assignmentServiceValidator;
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class AttachmentServiceTest extends TestCase {
|
||||
private $cardMapper;
|
||||
/** @var PermissionService|MockObject */
|
||||
private $permissionService;
|
||||
/** @var string */
|
||||
/** @var string */
|
||||
private $userId = 'admin';
|
||||
/** @var Application|MockObject */
|
||||
private $application;
|
||||
@@ -79,7 +79,7 @@ class AttachmentServiceTest extends TestCase {
|
||||
private $attachmentService;
|
||||
/** @var MockObject */
|
||||
private $attachmentServiceImpl;
|
||||
/** @var ActivityManager */
|
||||
/** @var ActivityManager */
|
||||
private $activityManager;
|
||||
private $appContainer;
|
||||
/** @var IL10N */
|
||||
@@ -91,7 +91,7 @@ class AttachmentServiceTest extends TestCase {
|
||||
*/
|
||||
private $filesAppServiceImpl;
|
||||
/**
|
||||
* @var AttachmentServiceValidator
|
||||
* @var AttachmentServiceValidator
|
||||
*/
|
||||
private $attachmentServiceValidator;
|
||||
|
||||
|
||||
@@ -31,17 +31,17 @@ use Test\TestCase;
|
||||
|
||||
class LabelServiceTest extends TestCase {
|
||||
|
||||
/** @var LabelMapper|\PHPUnit\Framework\MockObject\MockObject */
|
||||
/** @var LabelMapper|\PHPUnit\Framework\MockObject\MockObject */
|
||||
private $labelMapper;
|
||||
/** @var PermissionService|\PHPUnit\Framework\MockObject\MockObject */
|
||||
/** @var PermissionService|\PHPUnit\Framework\MockObject\MockObject */
|
||||
private $permissionService;
|
||||
/** @var LabelService */
|
||||
/** @var LabelService */
|
||||
private $labelService;
|
||||
/** @var BoardService|\PHPUnit\Framework\MockObject\MockObject */
|
||||
private $boardService;
|
||||
/** @var ChangeHelper|\PHPUnit\Framework\MockObject\MockObject */
|
||||
private $changeHelper;
|
||||
/** @var LabelServiceValidator\MockObject */
|
||||
/** @var LabelServiceValidator\MockObject */
|
||||
private $labelServiceValidator;
|
||||
|
||||
public function setUp(): void {
|
||||
|
||||
@@ -212,8 +212,8 @@ class StackServiceTest extends TestCase {
|
||||
$this->stackMapper->expects($this->once())->method('update')->willReturn($stackToBeDeleted);
|
||||
$this->cardMapper->expects($this->once())->method('findAll')->willReturn([]);
|
||||
$this->stackService->delete(123);
|
||||
$this->assertTrue($stackToBeDeleted->getDeletedAt() <= time(), "deletedAt is in the past");
|
||||
$this->assertTrue($stackToBeDeleted->getDeletedAt() > 0, "deletedAt is set");
|
||||
$this->assertTrue($stackToBeDeleted->getDeletedAt() <= time(), 'deletedAt is in the past');
|
||||
$this->assertTrue($stackToBeDeleted->getDeletedAt() > 0, 'deletedAt is set');
|
||||
}
|
||||
|
||||
public function testUpdate() {
|
||||
|
||||
@@ -111,8 +111,8 @@ class CardApiControllerTest extends \Test\TestCase {
|
||||
$this->stackExample['id']);
|
||||
|
||||
$this->cardService->expects($this->once())
|
||||
->method('update')
|
||||
->willReturn($card);
|
||||
->method('update')
|
||||
->willReturn($card);
|
||||
|
||||
$expected = new DataResponse($card, HTTP::STATUS_OK);
|
||||
$actual = $this->controller->update('title', 'plain', 0, 'description', $this->userId, null);
|
||||
|
||||
Reference in New Issue
Block a user