X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Ftests%2FDrupal%2FKernelTests%2FCore%2FTypedData%2FTypedDataTest.php;fp=web%2Fcore%2Ftests%2FDrupal%2FKernelTests%2FCore%2FTypedData%2FTypedDataTest.php;h=e3e3fae2fe8c276a65040fcccf02fb6c552b1284;hp=c79f2cfc9f4d14df0854426d5ff3a0a8a9e46a97;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php b/web/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php index c79f2cfc9..e3e3fae2f 100644 --- a/web/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php +++ b/web/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php @@ -399,7 +399,7 @@ class TypedDataTest extends KernelTestBase { // Check that an all-pass filter leaves the list untouched. $value = ['zero', 'one']; $typed_data = $this->createTypedData(ListDataDefinition::create('string'), $value); - $typed_data->filter(function(TypedDataInterface $item) { + $typed_data->filter(function (TypedDataInterface $item) { return TRUE; }); $this->assertEqual($typed_data->count(), 2); @@ -411,7 +411,7 @@ class TypedDataTest extends KernelTestBase { // Check that a none-pass filter empties the list. $value = ['zero', 'one']; $typed_data = $this->createTypedData(ListDataDefinition::create('string'), $value); - $typed_data->filter(function(TypedDataInterface $item) { + $typed_data->filter(function (TypedDataInterface $item) { return FALSE; }); $this->assertEqual($typed_data->count(), 0); @@ -419,7 +419,7 @@ class TypedDataTest extends KernelTestBase { // Check that filtering correctly renumbers elements. $value = ['zero', 'one', 'two']; $typed_data = $this->createTypedData(ListDataDefinition::create('string'), $value); - $typed_data->filter(function(TypedDataInterface $item) { + $typed_data->filter(function (TypedDataInterface $item) { return $item->getValue() !== 'one'; }); $this->assertEqual($typed_data->count(), 2);