File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Test/Unit/Controller/Index Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 4
4
* Copyright © Magento, Inc. All rights reserved.
5
5
* See COPYING.txt for license details.
6
6
*/
7
+ declare (strict_types=1 );
7
8
8
9
namespace Magento \Version \Controller \Index ;
9
10
10
- use Magento \Framework \App \Action \HttpGetActionInterface as HttpGetActionInterface ;
11
11
use Magento \Framework \App \Action \Action ;
12
12
use Magento \Framework \App \Action \Context ;
13
+ use Magento \Framework \App \Action \HttpGetActionInterface as HttpGetActionInterface ;
13
14
use Magento \Framework \App \ProductMetadataInterface ;
14
15
15
16
/**
@@ -40,7 +41,7 @@ public function __construct(Context $context, ProductMetadataInterface $productM
40
41
*
41
42
* @return void
42
43
*/
43
- public function execute ()
44
+ public function execute (): void
44
45
{
45
46
$ version = $ this ->productMetadata ->getVersion ();
46
47
$ versionParts = explode ('. ' , $ version );
@@ -61,7 +62,7 @@ public function execute()
61
62
* @param string $fullVersion
62
63
* @return bool
63
64
*/
64
- private function isGitBasedInstallation ($ fullVersion )
65
+ private function isGitBasedInstallation ($ fullVersion ): bool
65
66
{
66
67
return 0 === strpos ($ fullVersion , self ::DEV_PREFIX );
67
68
}
Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \Version \Test \Unit \Controller \Index ;
9
9
10
- use Magento \Version \Controller \Index \Index as VersionIndex ;
11
10
use Magento \Framework \App \Action \Context ;
12
11
use Magento \Framework \App \ProductMetadataInterface ;
13
12
use Magento \Framework \App \ResponseInterface ;
14
13
use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
14
+ use Magento \Version \Controller \Index \Index as VersionIndex ;
15
15
use PHPUnit \Framework \TestCase ;
16
16
17
17
class IndexTest extends TestCase
@@ -73,7 +73,7 @@ protected function setUp()
73
73
/**
74
74
* Git Base version does not return information about version
75
75
*/
76
- public function testGitBasedInstallationDoesNotReturnVersion ()
76
+ public function testGitBasedInstallationDoesNotReturnVersion (): void
77
77
{
78
78
$ this ->productMetadataMock ->expects ($ this ->any ())
79
79
->method ('getVersion ' )
@@ -88,7 +88,7 @@ public function testGitBasedInstallationDoesNotReturnVersion()
88
88
/**
89
89
* Magento Community returns information about major and minor version of product
90
90
*/
91
- public function testCommunityVersionDisplaysMajorMinorVersionAndEditionName ()
91
+ public function testCommunityVersionDisplaysMajorMinorVersionAndEditionName (): void
92
92
{
93
93
$ this ->productMetadataMock ->expects ($ this ->any ())->method ('getVersion ' )->willReturn ('2.3.3 ' );
94
94
$ this ->productMetadataMock ->expects ($ this ->any ())->method ('getEdition ' )->willReturn ('Community ' );
You can’t perform that action at this time.
0 commit comments