@@ -22,6 +22,16 @@ class ModuleDBChangeTest extends \PHPUnit_Framework_TestCase
22
22
*/
23
23
protected static $ changedFileList = '' ;
24
24
25
+ /**
26
+ * @var string Path for Magento's composer.json
27
+ */
28
+ protected static $ composerFilePath = BP . '/composer.json ' ;
29
+
30
+ /**
31
+ * @var bool Is tests executes on develop branch
32
+ */
33
+ protected static $ isOnDevVersion = false ;
34
+
25
35
/**
26
36
* Set changed files paths and list for all projects
27
37
*/
@@ -30,13 +40,23 @@ public static function setUpBeforeClass()
30
40
foreach (glob (self ::$ changedFilesPattern ) as $ changedFile ) {
31
41
self ::$ changedFileList .= file_get_contents ($ changedFile ) . PHP_EOL ;
32
42
}
43
+
44
+ if (file_exists (self ::$ composerFilePath )) {
45
+ $ jsonData = json_decode (file_get_contents (self ::$ composerFilePath ));
46
+ if (substr ((string ) $ jsonData ->version , -4 ) == '-dev ' ) {
47
+ self ::$ isOnDevVersion = true ;
48
+ }
49
+ }
33
50
}
34
51
35
52
/**
36
53
* Test changes for module.xml files
37
54
*/
38
55
public function testModuleXmlFiles ()
39
56
{
57
+ if (self ::$ isOnDevVersion ) {
58
+ $ this ->markTestSkipped ('This test isn \'t applicable to the developer version of Magento ' );
59
+ }
40
60
preg_match_all ('|etc/module\.xml$|mi ' , self ::$ changedFileList , $ matches );
41
61
$ this ->assertEmpty (
42
62
reset ($ matches ),
@@ -50,6 +70,9 @@ public function testModuleXmlFiles()
50
70
*/
51
71
public function testModuleSetupFiles ()
52
72
{
73
+ if (self ::$ isOnDevVersion ) {
74
+ $ this ->markTestSkipped ('This test isn \'t applicable to the developer version of Magento ' );
75
+ }
53
76
preg_match_all ('|app/code/Magento/[^/]+/Setup/[^/]+$|mi ' , self ::$ changedFileList , $ matches );
54
77
$ this ->assertEmpty (
55
78
reset ($ matches ),
0 commit comments