$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');
$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');
$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));
$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
$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);