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
magento2-functional-testing-framework
dev
tests
unit
Magento
FunctionalTestFramework
Util
TestGeneratorTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Tests\unit\Magento\FunctionalTestFramework\Test\Handlers
;
8
9
use AspectMock\Test as AspectMock;
10
11
use
Magento\FunctionalTestingFramework\Test\Objects\ActionObject
;
12
use
Magento\FunctionalTestingFramework\Test\Objects\TestObject
;
13
use
Magento\FunctionalTestingFramework\Util\MagentoTestCase
;
14
use
Magento\FunctionalTestingFramework\Util\TestGenerator
;
15
16
class
TestGeneratorTest
extends
MagentoTestCase
17
{
23
public
function
testEntityException
()
24
{
25
$actionObject =
new
ActionObject
(
'fakeAction'
,
'comment'
, [
26
'userInput'
=>
'{{someEntity.entity}}'
27
]);
28
29
$testObject =
new
TestObject
(
"sampleTest"
, [
"merge123"
=> $actionObject], [], [],
"filename"
);
30
31
$testGeneratorObject =
TestGenerator::getInstance
(
""
, [
"sampleTest"
=> $testObject]);
32
33
AspectMock::double(TestGenerator::class, [
'loadAllTestObjects'
=> [
"sampleTest"
=> $testObject]]);
34
35
$this->expectExceptionMessage(
"Could not resolve entity reference \"{{someEntity.entity}}\" "
.
36
"in Action with stepKey \"fakeAction\".\n"
.
37
"Exception occurred parsing action at StepKey \"fakeAction\" in Test \"sampleTest\""
);
38
39
$testGeneratorObject->createAllTestFiles(
null
, []);
40
}
41
}
Tests\unit\Magento\FunctionalTestFramework\Test\Handlers
Definition:
TestObjectHandlerTest.php:7
Tests\unit\Magento\FunctionalTestFramework\Test\Handlers\TestGeneratorTest\testEntityException
testEntityException()
Definition:
TestGeneratorTest.php:23
Magento\FunctionalTestingFramework\Util\TestGenerator\getInstance
static getInstance($dir=null, $tests=[], $debug=false)
Definition:
TestGenerator.php:114
Magento\FunctionalTestingFramework\Util\TestGenerator
Definition:
TestGenerator.php:32
Magento\FunctionalTestingFramework\Test\Objects\TestObject
Definition:
TestObject.php:18
Magento\FunctionalTestingFramework\Test\Objects\ActionObject
Definition:
ActionObject.php:24
Magento\FunctionalTestingFramework\Util\MagentoTestCase
Definition:
MagentoTestCase.php:15
Tests\unit\Magento\FunctionalTestFramework\Test\Handlers\TestGeneratorTest
Definition:
TestGeneratorTest.php:16