diff --git a/core/modules/migrate/tests/src/Unit/RowTest.php b/core/modules/migrate/tests/src/Unit/RowTest.php index 8f91f67..10d7d7d 100644 --- a/core/modules/migrate/tests/src/Unit/RowTest.php +++ b/core/modules/migrate/tests/src/Unit/RowTest.php @@ -88,12 +88,12 @@ public function testRowWithInvalidData() { public function testSourceFreeze() { $row = new Row($this->testValues, $this->testSourceIds); $row->rehash(); - $this->setExpectedException(\Exception::class); $this->assertSame($this->testHash, $row->getHash(), 'Correct hash.'); $row->setSourceProperty('title', 'new title'); $row->rehash(); $this->assertSame($this->testHashMod, $row->getHash(), 'Hash changed correctly.'); $row->freezeSource(); + $this->setExpectedException(\Exception::class); $row->setSourceProperty('title', 'new title'); } diff --git a/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbTest.php b/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbTest.php index 407dd27..67c7d98 100644 --- a/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbTest.php +++ b/core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbTest.php @@ -18,8 +18,8 @@ class BreadcrumbTest extends UnitTestCase { */ public function testSetLinks() { $breadcrumb = new Breadcrumb(); - $this->setExpectedException(\LogicException::class, 'Once breadcrumb links are set, only additional breadcrumb links can be added.'); $breadcrumb->setLinks([new Link('Home', Url::fromRoute(''))]); + $this->setExpectedException(\LogicException::class, 'Once breadcrumb links are set, only additional breadcrumb links can be added.'); $breadcrumb->setLinks([new Link('None', Url::fromRoute(''))]); }