100 lines
No EOL
3.5 KiB
JSON
100 lines
No EOL
3.5 KiB
JSON
{
|
|
"uuid": [
|
|
{
|
|
"value": "933982cb-09c6-41ba-9c52-5a1cdc258d37"
|
|
}
|
|
],
|
|
"langcode": [
|
|
{
|
|
"value": "en"
|
|
}
|
|
],
|
|
"type": [
|
|
{
|
|
"target_id": "daily_email",
|
|
"target_type": "node_type",
|
|
"target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7"
|
|
}
|
|
],
|
|
"revision_timestamp": [
|
|
{
|
|
"value": "2025-04-21T01:21:50+00:00"
|
|
}
|
|
],
|
|
"revision_uid": [
|
|
{
|
|
"target_type": "user",
|
|
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
|
|
}
|
|
],
|
|
"revision_log": [],
|
|
"status": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"uid": [
|
|
{
|
|
"target_type": "user",
|
|
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
|
|
}
|
|
],
|
|
"title": [
|
|
{
|
|
"value": "Writing custom assertions in your tests\n"
|
|
}
|
|
],
|
|
"created": [
|
|
{
|
|
"value": "2023-08-17T00:00:00+00:00"
|
|
}
|
|
],
|
|
"changed": [
|
|
{
|
|
"value": "2025-04-21T01:21:50+00:00"
|
|
}
|
|
],
|
|
"promote": [
|
|
{
|
|
"value": false
|
|
}
|
|
],
|
|
"sticky": [
|
|
{
|
|
"value": false
|
|
}
|
|
],
|
|
"default_langcode": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"revision_translation_affected": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"path": [
|
|
{
|
|
"alias": "\/daily\/2023\/08\/17\/writing-custom-assertions-in-your-tests",
|
|
"langcode": "en"
|
|
}
|
|
],
|
|
"body": [
|
|
{
|
|
"value": "\n <p>Writing custom assertions is a great way to clean up your test code.<\/p>\n\n<p>Here's an example from one of my client Drupal projects:<\/p>\n\n<pre><code class=\"language-php\">private static function assertProductVariationHasPrice(ProductVariationInterface $productVariation, string $expectedPrice): void {\n self::assertSame(\n actual: $productVariation->getPrice()->getNumber(),\n expected: $expectedPrice,\n );\n}\n<\/code><\/pre>\n\n<p>This one wraps a single assertion, but they could also include multiple assertions or additional steps.<\/p>\n\n<h2 id=\"here%27s-the-thing\">Here's the thing<\/h2>\n\n<p>A custom assertion is a simple function but it makes the test code more readable and less repetitive.<\/p>\n\n ",
|
|
"format": "full_html",
|
|
"processed": "\n <p>Writing custom assertions is a great way to clean up your test code.<\/p>\n\n<p>Here's an example from one of my client Drupal projects:<\/p>\n\n<pre><code class=\"language-php\">private static function assertProductVariationHasPrice(ProductVariationInterface $productVariation, string $expectedPrice): void {\n self::assertSame(\n actual: $productVariation->getPrice()->getNumber(),\n expected: $expectedPrice,\n );\n}\n<\/code><\/pre>\n\n<p>This one wraps a single assertion, but they could also include multiple assertions or additional steps.<\/p>\n\n<h2 id=\"here%27s-the-thing\">Here's the thing<\/h2>\n\n<p>A custom assertion is a simple function but it makes the test code more readable and less repetitive.<\/p>\n\n ",
|
|
"summary": null
|
|
}
|
|
],
|
|
"feeds_item": [
|
|
{
|
|
"imported": "2025-04-21T01:21:50+00:00",
|
|
"guid": null,
|
|
"hash": "a7a933ef1250a866505ee7da5f99d039",
|
|
"target_type": "feeds_feed",
|
|
"target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76"
|
|
}
|
|
]
|
|
} |