Skip to content

Commit 960d792

Browse files
authored
cli-command-session-test (#44710)
1 parent 0dd2150 commit 960d792

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

libraries/src/Console/SessionMetadataGcCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in
9090

9191
$symfonyStyle->success('Metadata garbage collection completed.');
9292

93-
return Command::FAILURE;
93+
return Command::SUCCESS;
9494
}
9595

9696
/**
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
describe('Test that console command session', () => {
2+
it('can garbage collection', () => {
3+
cy.exec(`php ${Cypress.env('cmsPath')}/cli/joomla.php session:gc`)
4+
.its('stdout')
5+
.should('contain', 'Garbage collection completed');
6+
});
7+
it('can metadata garbage collection', () => {
8+
cy.exec(`php ${Cypress.env('cmsPath')}/cli/joomla.php session:metadata:gc`)
9+
.its('stdout')
10+
.should('contain', 'Metadata garbage collection completed');
11+
});
12+
});

0 commit comments

Comments
 (0)