File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -499,6 +499,50 @@ public function readmeIsNotInSuggestedFileContent(): void
499499
500500Use the --create|-c option to create a .gitattributes file with the shown content.
501501
502+ CONTENT ;
503+
504+ $ this ->assertSame ($ expectedDisplay , $ commandTester ->getDisplay ());
505+ $ this ->assertTrue ($ commandTester ->getStatusCode () > Command::SUCCESS );
506+ }
507+
508+ #[Test]
509+ public function licenseAndReadmeAreNotInSuggestedFileContent (): void
510+ {
511+ $ artifactFilenames = [
512+ 'CONDUCT.md ' ,
513+ 'phpspec.yml.dist ' ,
514+ 'License.md ' ,
515+ 'README.md '
516+ ];
517+
518+ $ this ->createTemporaryFiles (
519+ $ artifactFilenames ,
520+ ['specs ' , 'docs ' ]
521+ );
522+
523+ $ command = $ this ->application ->find ('validate ' );
524+ $ commandTester = new CommandTester ($ command );
525+ $ commandTester ->execute ([
526+ 'command ' => $ command ->getName (),
527+ 'directory ' => WORKING_DIRECTORY ,
528+ '--keep-readme ' => true ,
529+ '--keep-license ' => true ,
530+ ]);
531+
532+ $ expectedDisplay = <<<CONTENT
533+ Warning: There is no .gitattributes file present in {$ this ->temporaryDirectory }.
534+
535+ Would expect the following .gitattributes file content:
536+ * text=auto eol=lf
537+
538+ .gitattributes export-ignore
539+ CONDUCT.md export-ignore
540+ docs/ export-ignore
541+ phpspec.yml.dist export-ignore
542+ specs/ export-ignore
543+
544+ Use the --create|-c option to create a .gitattributes file with the shown content.
545+
502546CONTENT ;
503547
504548 $ this ->assertSame ($ expectedDisplay , $ commandTester ->getDisplay ());
You can’t perform that action at this time.
0 commit comments