فهرست منبع

Fix configuration combinations test errors

Ribas160 1 سال پیش
والد
کامیت
c116d30ada
2فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 1 0
      CHANGELOG.md
  2. 3 2
      bin/configuration-test-generator

+ 1 - 0
CHANGELOG.md

@@ -8,6 +8,7 @@
 * FIXED: Sanitize file name in attachment size hint
 * FIXED: Unable to create a new paste from the cloned one when a JSON file attached (#1585)
 * FIXED: traffic limiter not working when using Filesystem storage and PHP opcache
+* FIXED: Configuration combinations test errors
 
 ## 1.7.8 (2025-06-30)
 * FIXED: Duplicate attachment for every comment (#1577)

+ 3 - 2
bin/configuration-test-generator

@@ -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'
         );