Skip to content

Commit a170ee6

Browse files
mvanhornAndyScherzinger
authored andcommitted
fix: reword trashbin:expire help and drop the metadata assertion test
Per review: "Processes deleted files" was confusing since the command deletes expired files rather than processing them. Description and help now say so directly, and the test that pinned the exact wording is removed.
1 parent 54536a1 commit a170ee6

2 files changed

Lines changed: 2 additions & 24 deletions

File tree

apps/files_trashbin/lib/Command/ExpireTrash.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ protected function configure(): void {
3737
parent::configure();
3838
$this
3939
->setName('trashbin:expire')
40-
->setDescription('Delete eligible trashbin entries according to the configured retention and space policy')
41-
->setHelp('Processes deleted files according to the configured trashbin retention and space policy. This does not disable the trashbin or unconditionally empty it.')
40+
->setDescription('Delete expired files from the trashbin')
41+
->setHelp('Deletes expired files from the trashbin according to the configured retention and space policy. This does not disable the trashbin or unconditionally empty it.')
4242
->addArgument(
4343
'user_id',
4444
InputArgument::OPTIONAL | InputArgument::IS_ARRAY,

apps/files_trashbin/tests/Command/ExpireTrashTest.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -67,28 +67,6 @@ protected function tearDown(): void {
6767
parent::tearDown();
6868
}
6969

70-
public function testCommandMetadata(): void {
71-
$command = new ExpireTrash(
72-
Server::get(IUserManager::class),
73-
$this->expiration,
74-
Server::get(SetupManager::class),
75-
Server::get(IRootFolder::class),
76-
);
77-
78-
$this->assertSame(
79-
'Delete eligible trashbin entries according to the configured retention and space policy',
80-
$command->getDescription(),
81-
);
82-
$this->assertSame(
83-
'Processes deleted files according to the configured trashbin retention and space policy. This does not disable the trashbin or unconditionally empty it.',
84-
$command->getHelp(),
85-
);
86-
$this->assertSame(
87-
'Limit processing to the given user ID(s); if no user ID is given, all users are processed',
88-
$command->getDefinition()->getArgument('user_id')->getDescription(),
89-
);
90-
}
91-
9270
#[DataProvider(methodName: 'retentionObligationProvider')]
9371
public function testRetentionObligation(string $obligation, string $quota, int $elapsed, int $fileSize, bool $shouldExpire): void {
9472
$this->config->setSystemValues(['trashbin_retention_obligation' => $obligation]);

0 commit comments

Comments
 (0)