File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
dev/tests/unit/Magento/FunctionalTestFramework/DataGenerator/Handlers Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,31 @@ public function setUp()
3232 TestLoggingUtil::getInstance ()->setMockLoggingUtil ();
3333 }
3434
35+ public function testCreateInvalidEntity ()
36+ {
37+ // Test Data and Variables
38+
39+ $ entityName = "InvalidEntity " ;
40+ $ entityStepKey = "StepKey " ;
41+ $ scope = PersistedObjectHandler::TEST_SCOPE ;
42+
43+ $ exceptionMessage = "Entity \"" . $ entityName . "\" does not exist. " .
44+ "\nException occurred parsing action at StepKey \"" . $ entityStepKey . "\"" ;
45+
46+ $ this ->expectException (TestReferenceException::class);
47+
48+ $ this ->expectExceptionMessage ($ exceptionMessage );
49+
50+ $ handler = PersistedObjectHandler::getInstance ();
51+
52+ // Call method
53+ $ handler ->createEntity (
54+ $ entityStepKey ,
55+ $ scope ,
56+ $ entityName
57+ );
58+ }
59+
3560 public function testCreateSimpleEntity ()
3661 {
3762 // Test Data and Variables
You can’t perform that action at this time.
0 commit comments