@@ -113,6 +113,18 @@ public function test_get_markdown_files_method_does_not_include_files_with_exten
113
113
File::deleteDirectory (Hyde::path ('_data/foo ' ));
114
114
}
115
115
116
+ // test get markdown files method does not remove files starting with an underscore
117
+ public function test_get_markdown_files_method_does_not_remove_files_starting_with_an_underscore ()
118
+ {
119
+ mkdir (Hyde::path ('_data/foo ' ));
120
+ Hyde::touch (('_data/foo/_foo.md ' ));
121
+
122
+ $ this ->assertEquals ([
123
+ Hyde::path ('_data/foo/_foo.md ' ),
124
+ ], (new DataCollection ('foo ' ))->getMarkdownFiles ());
125
+ File::deleteDirectory (Hyde::path ('_data/foo ' ));
126
+ }
127
+
116
128
public function test_static_markdown_helper_returns_new_data_collection_instance ()
117
129
{
118
130
$ this ->assertInstanceOf (DataCollection::class, DataCollection::markdown ('foo ' ));
@@ -131,12 +143,12 @@ public function test_static_markdown_helper_discovers_and_parses_markdown_files_
131
143
File::deleteDirectory (Hyde::path ('_data/foo ' ));
132
144
}
133
145
134
- public function test_static_markdown_helper_ignores_files_starting_with_an_underscore ()
146
+ public function test_static_markdown_helper_doest_not_ignore_files_starting_with_an_underscore ()
135
147
{
136
148
mkdir (Hyde::path ('_data/foo ' ));
137
149
Hyde::touch (('_data/foo/foo.md ' ));
138
150
Hyde::touch (('_data/foo/_bar.md ' ));
139
- $ this ->assertCount (1 , DataCollection::markdown ('foo ' ));
151
+ $ this ->assertCount (2 , DataCollection::markdown ('foo ' ));
140
152
File::deleteDirectory (Hyde::path ('_data/foo ' ));
141
153
}
142
154
0 commit comments