- // We touch a scaffold file, so we can check the file was modified after
- // the custom commandscaffold update.
- touch($exampleScaffoldFile);
- clearstatcache();
- $mtime_touched = filemtime($exampleScaffoldFile);
- $this->composer('drupal-scaffold');
- clearstatcache();
- $mtime_after = filemtime($exampleScaffoldFile);
- $this->assertNotEquals($mtime_after, $mtime_touched, 'Scaffold file was modified by custom command.');
+ // We touch a scaffold file, so we can check the file was modified by the
+ // custom command.
+ file_put_contents($exampleScaffoldFile, 1);
+ $this->composer('drupal:scaffold');
+ $this->assertNotEquals(file_get_contents($exampleScaffoldFile), 1, 'Scaffold file was modified by custom command.');