Definition at line 19 of file ObjectManagerTest.php.
◆ testInstanceDestroyingAfterClearCache()
testInstanceDestroyingAfterClearCache |
( |
| ) |
|
Tests that instance is destroyed after Object Manager cache clearing.
@covers \Magento\TestFramework\ObjectManager::clearCache()
Definition at line 81 of file ObjectManagerTest.php.
83 $sharedInstances[self::$notPersistedInstance] = $this->createInstanceMock(self::$notPersistedInstance);
84 $config = $this->getObjectManagerConfigMock();
85 $factory = $this->getObjectManagerFactoryMock();
92 'Instance of ' . self::$notPersistedInstance .
' should be destroyed after cache clearing.'
◆ testInstancePersistingAfterClearCache()
testInstancePersistingAfterClearCache |
( |
| ) |
|
Tests that the scope of persisted instances doesn't clear after Object Manager cache clearing.
@covers \Magento\TestFramework\ObjectManager::clearCache()
Definition at line 45 of file ObjectManagerTest.php.
47 foreach (self::$persistedInstances as
$className) {
51 $config = $this->getObjectManagerConfigMock();
52 $factory = $this->getObjectManagerFactoryMock();
60 "Object manager instance should be the same after cache clearing." 65 "Object manager instance should be the same after cache clearing." 67 foreach (self::$persistedInstances as
$className) {
71 "Instance of {$className} should be the same after cache clearing."
◆ testInstanceRecreatingAfterClearCache()
testInstanceRecreatingAfterClearCache |
( |
| ) |
|
Tests that instance is recreated after Object Manager cache clearing.
@covers \Magento\TestFramework\ObjectManager::clearCache()
Definition at line 101 of file ObjectManagerTest.php.
103 $config = $this->getObjectManagerConfigMock();
104 $factory = $this->getObjectManagerFactoryMock();
109 $this->assertSame($instance,
$objectManager->get(DataObject::class));
111 $this->assertNotSame(
114 'Instance ' . DataObject::class .
' should be recreated after cache clearing.'
◆ testIsEmptyMappedTableNamesAfterClearCache()
testIsEmptyMappedTableNamesAfterClearCache |
( |
| ) |
|
Tests that mapped table names list is empty after Object Manager cache clearing.
@covers \Magento\TestFramework\ObjectManager::clearCache()
Definition at line 123 of file ObjectManagerTest.php.
125 $config = $this->getObjectManagerConfigMock();
126 $factory = $this->getObjectManagerFactoryMock();
134 ResourceConnection::class
139 $objectManager->get(ResourceConnection::class)->getMappedTableName(
'tableName'),
140 'Mapped table names list is not empty after Object Manager cache clearing.'
The documentation for this class was generated from the following file:
- vendor/magento/magento2-base/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ObjectManagerTest.php