Skip to content
Snippets Groups Projects
Commit a2270154 authored by catch's avatar catch
Browse files

Issue #3522795 by alexpott, bbrala:...

Issue #3522795 by alexpott, bbrala: \Drupal\Tests\Core\DefaultContent\FinderTest::testExceptionIfNoUuid() can cause random fails

(cherry picked from commit d0d9ddba)
parent 7800942b
No related branches found
No related tags found
1 merge request!122353526426-warning-for-missing
Pipeline #490126 passed
Pipeline: drupal

#490129

    ......@@ -4,7 +4,6 @@
    namespace Drupal\Tests\Core\DefaultContent;
    use Drupal\Component\FileSystem\FileSystem;
    use Drupal\Core\DefaultContent\Finder;
    use Drupal\Core\DefaultContent\ImportException;
    use Drupal\Tests\UnitTestCase;
    ......@@ -38,14 +37,9 @@ public function testFoundDataIsInDependencyOrder(): void {
    * Tests that files without UUIDs will raise an exception.
    */
    public function testExceptionIfNoUuid(): void {
    $dir = FileSystem::getOsTemporaryDirectory();
    $this->assertIsString($dir);
    /** @var string $dir */
    file_put_contents($dir . '/no-uuid.yml', '_meta: {}');
    $this->expectException(ImportException::class);
    $this->expectExceptionMessage("$dir/no-uuid.yml does not have a UUID.");
    new Finder($dir);
    $this->expectExceptionMessageMatches("#/no-uuid\.yml does not have a UUID\.$#");
    new Finder(__DIR__ . '/../../../../fixtures/default_content_broken');
    }
    }
    _meta:
    version: '1.0'
    entity_type: block_content
    bundle: basic
    default_langcode: en
    default:
    status:
    -
    value: true
    info:
    -
    value: 'Useful Info'
    reusable:
    -
    value: true
    revision_translation_affected:
    -
    value: true
    body:
    -
    value: "I'd love to put some useful info here."
    format: plain_text
    summary: ''
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment