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
TestFramework
Test
Unit
Autoloader
FactoryGeneratorTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\TestFramework\Test\Unit\Autoloader
;
8
9
use
Magento\Framework\TestFramework\Unit\Autoloader\FactoryGenerator
;
10
11
class
FactoryGeneratorTest
extends
\PHPUnit\Framework\TestCase
12
{
16
private
$subject;
17
18
protected
function
setUp
()
19
{
20
$this->subject =
new
FactoryGenerator
();
21
}
22
23
public
function
testGenerateFactory
()
24
{
25
$this->assertStringMatchesFormat(
26
'%Anamespace My%Aclass SimpleFactory%Afunction create%A'
,
27
$this->subject->generate(
'\My\SimpleFactory'
)
28
);
29
}
30
35
public
function
testGenerateNonFactory
(
$className
)
36
{
37
$this->assertFalse($this->subject->generate(
$className
));
38
}
39
43
public
function
generateNonFactoryDataProvider
()
44
{
45
return
[
46
'non-factory class'
=> [
'\My\SimpleClass'
],
47
'non-conventional factory name'
=> [
'\My\Factory'
],
48
];
49
}
50
}
Magento\Framework\TestFramework\Test\Unit\Autoloader\FactoryGeneratorTest\testGenerateFactory
testGenerateFactory()
Definition:
FactoryGeneratorTest.php:23
Magento\Framework\TestFramework\Test\Unit\Autoloader\FactoryGeneratorTest\testGenerateNonFactory
testGenerateNonFactory($className)
Definition:
FactoryGeneratorTest.php:35
Magento\Framework\TestFramework\Test\Unit\Autoloader\FactoryGeneratorTest\generateNonFactoryDataProvider
generateNonFactoryDataProvider()
Definition:
FactoryGeneratorTest.php:43
Magento\Framework\TestFramework\Unit\Autoloader\FactoryGenerator
Definition:
FactoryGenerator.php:14
Magento\Framework\TestFramework\Test\Unit\Autoloader\FactoryGeneratorTest
Definition:
FactoryGeneratorTest.php:11
Magento\Framework\TestFramework\Test\Unit\Autoloader\FactoryGeneratorTest\setUp
setUp()
Definition:
FactoryGeneratorTest.php:18
Magento\Framework\TestFramework\Test\Unit\Autoloader
Definition:
ExtensionAttributesGeneratorTest.php:7
$className
if($currentSelectedMethod==$_code) $className
Definition:
form.phtml:31