Fix configuration combinations test errors

This commit is contained in:
Ribas160 2025-07-22 22:33:04 +03:00
parent e82be3bd9d
commit d04401c12b
No known key found for this signature in database
GPG key ID: ED4AE99DCA25A6BB
2 changed files with 4 additions and 2 deletions

View file

@ -536,7 +536,8 @@ EOT;
break;
case 'Delete':
$code .= PHP_EOL . <<<'EOT'
$this->_model->create(Helper::getPasteId(), Helper::getPaste());
$paste = Helper::getPaste();
$this->_model->create(Helper::getPasteId(), $paste);
$this->assertTrue($this->_model->exists(Helper::getPasteId()), 'paste exists before deleting data');
$_GET['pasteid'] = Helper::getPasteId();
$_GET['deletetoken'] = hash_hmac('sha256', Helper::getPasteId(), $this->_model->read(Helper::getPasteId())['meta']['salt']);
@ -574,7 +575,7 @@ EOT;
$code .= <<<'EOT'
$this->assertMatchesRegularExpression(
'#<div[^>]*id="status"[^>]*>.*Paste was properly deleted[^<]*</div>#s',
'#<div[^>]*id="status"[^>]*>.*Paste was properly deleted[^<]*(<button|<\/div>)#s',
$content,
'outputs deleted status correctly'
);