@@ -67,8 +67,8 @@ public function testComposerInstallAndUpdate() {
67
67
$ this ->assertFileExists ($ exampleScaffoldFile , 'Scaffold file should be automatically installed. ' );
68
68
$ this ->fs ->remove ($ exampleScaffoldFile );
69
69
$ this ->assertFileNotExists ($ exampleScaffoldFile , 'Scaffold file should not be exist. ' );
70
- $ this ->composer ('drupal- scaffold ' );
71
- $ this ->assertFileExists ($ exampleScaffoldFile , 'Scaffold file should be installed by "drupal- scaffold" command. ' );
70
+ $ this ->composer ('drupal: scaffold ' );
71
+ $ this ->assertFileExists ($ exampleScaffoldFile , 'Scaffold file should be installed by "drupal: scaffold" command. ' );
72
72
73
73
foreach (['8.0.1 ' , '8.1.x-dev ' , '8.3.0 ' , '8.5.x-dev ' ] as $ version ) {
74
74
// We touch a scaffold file, so we can check the file was modified after
@@ -103,15 +103,11 @@ public function testComposerInstallAndUpdate() {
103
103
}
104
104
}
105
105
106
- // We touch a scaffold file, so we can check the file was modified after
107
- // the custom commandscaffold update.
108
- touch ($ exampleScaffoldFile );
109
- clearstatcache ();
110
- $ mtime_touched = filemtime ($ exampleScaffoldFile );
111
- $ this ->composer ('drupal-scaffold ' );
112
- clearstatcache ();
113
- $ mtime_after = filemtime ($ exampleScaffoldFile );
114
- $ this ->assertNotEquals ($ mtime_after , $ mtime_touched , 'Scaffold file was modified by custom command. ' );
106
+ // We touch a scaffold file, so we can check the file was modified by the
107
+ // custom command.
108
+ file_put_contents ($ exampleScaffoldFile , 1 );
109
+ $ this ->composer ('drupal:scaffold ' );
110
+ $ this ->assertNotEquals (file_get_contents ($ exampleScaffoldFile ), 1 , 'Scaffold file was modified by custom command. ' );
115
111
}
116
112
117
113
/**
@@ -151,9 +147,6 @@ protected function composerJSONDefaults() {
151
147
'composer/installers ' => '^1.0.20 ' ,
152
148
'drupal/core ' => '8.0.0 ' ,
153
149
),
154
- 'scripts ' => array (
155
- 'drupal-scaffold ' => 'DrupalComposer \\DrupalScaffold \\Plugin::scaffold ' ,
156
- ),
157
150
'minimum-stability ' => 'dev ' ,
158
151
);
159
152
}
0 commit comments