Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
ObjectManager
Test
Unit
Relations
RuntimeTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\ObjectManager\Test\Unit\Relations
;
8
9
require_once
__DIR__
.
'/../_files/Child.php'
;
10
11
class
RuntimeTest
extends
\PHPUnit\Framework\TestCase
12
{
16
private
$model;
17
18
protected
function
setUp
()
19
{
20
$this->model = new \Magento\Framework\ObjectManager\Relations\Runtime();
21
}
22
28
public
function
testGetParents
(
$type
, $parents)
29
{
30
$this->assertEquals($parents, $this->model->getParents(
$type
));
31
}
32
36
public
function
getParentsDataProvider
()
37
{
38
return
[
39
[\Magento\Test\Di\DiInterface::class, []],
40
[\Magento\Test\Di\DiParent::class, [
null
, \Magento\Test\Di\DiInterface::class]],
41
[\Magento\Test\Di\Child::class, [\Magento\Test\Di\DiParent::class, \Magento\Test\Di\ChildInterface::class]]
42
];
43
}
44
48
public
function
testHasIfNonExists
()
49
{
50
$this->assertFalse($this->model->has(\NonexistentClass::class));
51
}
52
}
Magento\Framework\ObjectManager\Test\Unit\Relations
Definition:
RuntimeTest.php:7
Magento\Framework\ObjectManager\Test\Unit\Relations\RuntimeTest\setUp
setUp()
Definition:
RuntimeTest.php:18
__DIR__
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition:
_bootstrap.php:60
$type
$type
Definition:
item.phtml:13
Magento\Framework\ObjectManager\Test\Unit\Relations\RuntimeTest\getParentsDataProvider
getParentsDataProvider()
Definition:
RuntimeTest.php:36
Magento\Framework\ObjectManager\Test\Unit\Relations\RuntimeTest
Definition:
RuntimeTest.php:11
Magento\Framework\ObjectManager\Test\Unit\Relations\RuntimeTest\testHasIfNonExists
testHasIfNonExists()
Definition:
RuntimeTest.php:48
Magento\Framework\ObjectManager\Test\Unit\Relations\RuntimeTest\testGetParents
testGetParents($type, $parents)
Definition:
RuntimeTest.php:28