Fix: Deprecated NULL placeholder value for key (%birth_label)

...in: "Birth log saved: <a href=":birth_url">%birth_label</a>". This will throw a PHP error in drupal:11.0.0. See https://www.drupal.org/node/3318826
    2x in BirthTest::testBirthLogChildrenSync from Drupal\Tests\farm_birth\Kernel
    1x in BirthTest::testUniqueBirthLogConstraint from Drupal\Tests\farm_birth\Kernel
This commit is contained in:
Michael Stenta 2023-10-11 12:46:19 -04:00
parent 5cc870c316
commit 81c3cd2ec0
1 changed files with 4 additions and 0 deletions

View File

@ -113,6 +113,7 @@ class BirthTest extends KernelTestBase {
// Create a birth log that references the mother and children.
$log = Log::create([
'name' => $this->randomMachineName(),
'type' => 'birth',
'timestamp' => $timestamp,
'mother' => ['target_id' => $mother->id()],
@ -149,6 +150,7 @@ class BirthTest extends KernelTestBase {
// Create a birth log that references the second mother and one of the
// original children.
$log = Log::create([
'name' => $this->randomMachineName(),
'type' => 'birth',
'timestamp' => $timestamp,
'mother' => ['target_id' => $mother2->id()],
@ -192,6 +194,7 @@ class BirthTest extends KernelTestBase {
// Create a birth log that references the asset.
$log1 = Log::create([
'name' => $this->randomMachineName(),
'type' => 'birth',
'timestamp' => \Drupal::time()->getRequestTime(),
'asset' => [['target_id' => $asset->id()]],
@ -205,6 +208,7 @@ class BirthTest extends KernelTestBase {
// Create a second birth log that references the asset.
$log2 = Log::create([
'name' => $this->randomMachineName(),
'type' => 'birth',
'timestamp' => \Drupal::time()->getRequestTime(),
'asset' => [['target_id' => $asset->id()]],