X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Ftests%2FDrupal%2FKernelTests%2FCore%2FConfig%2FStorage%2FConfigStorageTestBase.php;fp=web%2Fcore%2Ftests%2FDrupal%2FKernelTests%2FCore%2FConfig%2FStorage%2FConfigStorageTestBase.php;h=5bdbc74deba86bf301023923b8451ea76d594bab;hp=54d01641780315d4bd03727e72603b4ea1f25ab3;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php b/web/core/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php index 54d016417..5bdbc74de 100644 --- a/web/core/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php +++ b/web/core/tests/Drupal/KernelTests/Core/Config/Storage/ConfigStorageTestBase.php @@ -189,7 +189,7 @@ abstract class ConfigStorageTestBase extends KernelTestBase { $data = ['foo' => 'bar']; $result = $this->storage->write($name, $data); $this->assertIdentical($result, TRUE); - $this->assertIdentical($data, $this->storage->read($name)); + $this->assertSame($data, $this->storage->read($name)); // Create configuration in a new collection. $new_storage = $this->storage->createCollection('collection.sub.new'); @@ -197,13 +197,13 @@ abstract class ConfigStorageTestBase extends KernelTestBase { $this->assertEqual([], $new_storage->listAll()); $new_storage->write($name, $data); $this->assertIdentical($result, TRUE); - $this->assertIdentical($data, $new_storage->read($name)); + $this->assertSame($data, $new_storage->read($name)); $this->assertEqual([$name], $new_storage->listAll()); $this->assertTrue($new_storage->exists($name)); $new_data = ['foo' => 'baz']; $new_storage->write($name, $new_data); $this->assertIdentical($result, TRUE); - $this->assertIdentical($new_data, $new_storage->read($name)); + $this->assertSame($new_data, $new_storage->read($name)); // Create configuration in another collection. $another_storage = $this->storage->createCollection('collection.sub.another'); @@ -211,7 +211,7 @@ abstract class ConfigStorageTestBase extends KernelTestBase { $this->assertEqual([], $another_storage->listAll()); $another_storage->write($name, $new_data); $this->assertIdentical($result, TRUE); - $this->assertIdentical($new_data, $another_storage->read($name)); + $this->assertSame($new_data, $another_storage->read($name)); $this->assertEqual([$name], $another_storage->listAll()); $this->assertTrue($another_storage->exists($name)); @@ -219,18 +219,18 @@ abstract class ConfigStorageTestBase extends KernelTestBase { $alt_storage = $this->storage->createCollection('alternate'); $alt_storage->write($name, $new_data); $this->assertIdentical($result, TRUE); - $this->assertIdentical($new_data, $alt_storage->read($name)); + $this->assertSame($new_data, $alt_storage->read($name)); // Switch back to the collection-less mode and check the data still exists // add has not been touched. - $this->assertIdentical($data, $this->storage->read($name)); + $this->assertSame($data, $this->storage->read($name)); // Check that the getAllCollectionNames() method works. - $this->assertIdentical(['alternate', 'collection.sub.another', 'collection.sub.new'], $this->storage->getAllCollectionNames()); + $this->assertSame(['alternate', 'collection.sub.another', 'collection.sub.new'], $this->storage->getAllCollectionNames()); // Check that the collections are removed when they are empty. $alt_storage->delete($name); - $this->assertIdentical(['collection.sub.another', 'collection.sub.new'], $this->storage->getAllCollectionNames()); + $this->assertSame(['collection.sub.another', 'collection.sub.new'], $this->storage->getAllCollectionNames()); // Create configuration in collection called 'collection'. This ensures that // FileStorage's collection storage works regardless of its use of @@ -240,19 +240,19 @@ abstract class ConfigStorageTestBase extends KernelTestBase { $this->assertEqual([], $parent_storage->listAll()); $parent_storage->write($name, $new_data); $this->assertIdentical($result, TRUE); - $this->assertIdentical($new_data, $parent_storage->read($name)); + $this->assertSame($new_data, $parent_storage->read($name)); $this->assertEqual([$name], $parent_storage->listAll()); $this->assertTrue($parent_storage->exists($name)); - $this->assertIdentical(['collection', 'collection.sub.another', 'collection.sub.new'], $this->storage->getAllCollectionNames()); + $this->assertSame(['collection', 'collection.sub.another', 'collection.sub.new'], $this->storage->getAllCollectionNames()); $parent_storage->deleteAll(); - $this->assertIdentical(['collection.sub.another', 'collection.sub.new'], $this->storage->getAllCollectionNames()); + $this->assertSame(['collection.sub.another', 'collection.sub.new'], $this->storage->getAllCollectionNames()); // Check that the having an empty collection-less storage does not break // anything. Before deleting check that the previous delete did not affect // data in another collection. - $this->assertIdentical($data, $this->storage->read($name)); + $this->assertSame($data, $this->storage->read($name)); $this->storage->delete($name); - $this->assertIdentical(['collection.sub.another', 'collection.sub.new'], $this->storage->getAllCollectionNames()); + $this->assertSame(['collection.sub.another', 'collection.sub.new'], $this->storage->getAllCollectionNames()); } abstract protected function read($name);