@@ -67,8 +67,8 @@ public function testComposerInstallAndUpdate() {
6767 $ this ->assertFileExists ($ exampleScaffoldFile , 'Scaffold file should be automatically installed. ' );
6868 $ this ->fs ->remove ($ exampleScaffoldFile );
6969 $ 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. ' );
7272
7373 foreach (['8.0.1 ' , '8.1.x-dev ' , '8.3.0 ' , '8.5.x-dev ' ] as $ version ) {
7474 // We touch a scaffold file, so we can check the file was modified after
@@ -103,15 +103,11 @@ public function testComposerInstallAndUpdate() {
103103 }
104104 }
105105
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. ' );
115111 }
116112
117113 /**
@@ -151,9 +147,6 @@ protected function composerJSONDefaults() {
151147 'composer/installers ' => '^1.0.20 ' ,
152148 'drupal/core ' => '8.0.0 ' ,
153149 ),
154- 'scripts ' => array (
155- 'drupal-scaffold ' => 'DrupalComposer \\DrupalScaffold \\Plugin::scaffold ' ,
156- ),
157150 'minimum-stability ' => 'dev ' ,
158151 );
159152 }
0 commit comments