@@ -315,7 +315,7 @@ public function configSetValidationErrorDataProvider()
315
315
[
316
316
Custom::XML_PATH_UNSECURE_BASE_URL ,
317
317
'value ' ,
318
- 'Invalid value . Value must be a URL or one of placeholders: {{base_url}} '
318
+ 'Invalid Base URL . Value must be a URL or one of placeholders: {{base_url}} '
319
319
],
320
320
//set not existed field path
321
321
[
@@ -504,82 +504,4 @@ private function setConfig($path, $value, $message, $scope, $scopeCode)
504
504
$ status = $ command ->run ($ input , $ output );
505
505
return $ status ;
506
506
}
507
-
508
- /**
509
- * Tests different scenarios for scope options.
510
- *
511
- * @param \Closure $expectations
512
- * @param string $path
513
- * @param string $value
514
- * @param string $scope
515
- * @param string $scopeCode
516
- * @magentoDbIsolation enabled
517
- * @dataProvider getRunPathValidationDataProvider
518
- */
519
- public function testRunPathValidation (
520
- \Closure $ expectations ,
521
- $ path ,
522
- $ value ,
523
- $ scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT ,
524
- $ scopeCode = null
525
- ) {
526
- $ this ->inputMock ->expects ($ this ->any ())
527
- ->method ('getArgument ' )
528
- ->willReturnMap ([
529
- [ConfigSetCommand::ARG_PATH , $ path ],
530
- [ConfigSetCommand::ARG_VALUE , $ value ]
531
- ]);
532
- $ this ->inputMock ->expects ($ this ->any ())
533
- ->method ('getOption ' )
534
- ->willReturnMap ([
535
- [ConfigSetCommand::OPTION_SCOPE , $ scope ],
536
- [ConfigSetCommand::OPTION_SCOPE_CODE , $ scopeCode ]
537
- ]);
538
-
539
- $ expectations ($ this ->outputMock );
540
-
541
- /** @var ConfigSetCommand $command */
542
- $ command = $ this ->objectManager ->create (ConfigSetCommand::class);
543
- $ command ->run ($ this ->inputMock , $ this ->outputMock );
544
- }
545
-
546
- /**
547
- * Retrieves variations with callback, path, value, scope and scope code.
548
- *
549
- * @return array
550
- */
551
- public function getRunPathValidationDataProvider ()
552
- {
553
- return [
554
- [
555
- function (Mock $ output ) {
556
- $ output ->expects ($ this ->once ())
557
- ->method ('writeln ' )
558
- ->with ('<info>Value was saved.</info> ' );
559
- },
560
- 'web/unsecure/base_url ' ,
561
- 'http://magento2.local/ ' ,
562
- ],
563
- [
564
- function (Mock $ output ) {
565
- $ output ->expects ($ this ->once ())
566
- ->method ('writeln ' )
567
- ->with (
568
- '<error>Invalid Base URL. Value must be a URL or one of placeholders: {{base_url}}</error> '
569
- );
570
- },
571
- 'web/unsecure/base_url ' ,
572
- 'value ' ,
573
- ],
574
- [
575
- function (Mock $ output ) {
576
- $ output ->expects ($ this ->once ())
577
- ->method ('writeln ' )
578
- ->with ('<error>The "test/test/test" path does not exist</error> ' );
579
- },
580
- 'test/test/test ' ,
581
- 'value ' ,
582
- ]
583
- ];
584
- }
585
507
}
0 commit comments