@@ -85,6 +85,9 @@ public function testLoadEpub(string $epubPath, bool $shouldLoad, array $expected
8585 $ this ->assertSame ($ expectedMetadata ['description ' ], $ metadata ->getDescription ());
8686 $ this ->assertSame ($ expectedMetadata ['publisher ' ], $ metadata ->getPublisher ());
8787 $ this ->assertSame ($ expectedMetadata ['language ' ], $ metadata ->getLanguage ());
88+ $ this ->assertSame ($ expectedMetadata ['subject ' ], $ metadata ->getSubject ());
89+ $ this ->assertSame ($ expectedMetadata ['date ' ], $ metadata ->getDate ());
90+ $ this ->assertSame ($ expectedMetadata ['identifiers ' ], $ metadata ->getIdentifiers ());
8891 }
8992 }
9093
@@ -114,6 +117,12 @@ public static function epubFileProvider(): Iterator
114117 'description ' => 'These tests include starting the reading system and opening the titles, navigating the content, searching, and using bookmarks and notes. ' ,
115118 'publisher ' => '' ,
116119 'language ' => 'en ' ,
120+ 'subject ' => 'basic-functionality ' ,
121+ 'date ' => '' ,
122+ 'identifiers ' => [
123+ 'com.github.epub-testsuite.epub30-test-0301-2.0.0 ' ,
124+ '9781003410126 '
125+ ],
117126 ]];
118127 yield [__DIR__ . DIRECTORY_SEPARATOR . 'fixtures ' . DIRECTORY_SEPARATOR . 'valid_1.epub ' , true , [
119128 'title ' => 'Anonim ' ,
@@ -123,6 +132,11 @@ public static function epubFileProvider(): Iterator
123132 'description ' => '' ,
124133 'publisher ' => '' ,
125134 'language ' => 'ro ' ,
135+ 'subject ' => '' ,
136+ 'date ' => '2015-08-24 ' ,
137+ 'identifiers ' => [
138+ 'AWP-DF47F263-F894-490D-9E8A-2492EC571534 '
139+ ],
126140 ]];
127141 yield [__DIR__ . DIRECTORY_SEPARATOR . 'fixtures ' . DIRECTORY_SEPARATOR . 'valid_2.epub ' , true , [
128142 'title ' => 'Brave New World ' ,
@@ -132,6 +146,11 @@ public static function epubFileProvider(): Iterator
132146 'description ' => '' ,
133147 'publisher ' => 'epubBooks Classics ' ,
134148 'language ' => 'en ' ,
149+ 'subject ' => 'Science Fiction ' ,
150+ 'date ' => '2014-12-29 ' ,
151+ 'identifiers ' => [
152+ '_simple_book '
153+ ],
135154 ]];
136155 yield [__DIR__ . DIRECTORY_SEPARATOR . 'fixtures ' . DIRECTORY_SEPARATOR . 'valid_3.epub ' , true , [
137156 'title ' => 'King of the Range ' ,
@@ -141,6 +160,11 @@ public static function epubFileProvider(): Iterator
141160 'description ' => '' ,
142161 'publisher ' => 'Distributed Proofreaders Canada ' ,
143162 'language ' => 'en ' ,
163+ 'subject ' => 'fiction ' ,
164+ 'date ' => '1974-01-14T13:30:00+00:00 ' ,
165+ 'identifiers ' => [
166+ '0fe42443-c7d5-4615-a5b2-cc8b07de619c '
167+ ],
144168 ]];
145169 yield [__DIR__ . DIRECTORY_SEPARATOR . 'fixtures ' . DIRECTORY_SEPARATOR . 'valid_4.epub ' , true , [
146170 'title ' => 'EPUB 3.0 Specification ' ,
@@ -150,6 +174,11 @@ public static function epubFileProvider(): Iterator
150174 'description ' => '' ,
151175 'publisher ' => '' ,
152176 'language ' => 'en ' ,
177+ 'subject ' => '' ,
178+ 'date ' => '' ,
179+ 'identifiers ' => [
180+ 'code.google.com.epub-samples.epub30-spec '
181+ ],
153182 ]];
154183 yield [__DIR__ . DIRECTORY_SEPARATOR . 'fixtures ' . DIRECTORY_SEPARATOR . 'valid_5.epub ' , true , [
155184 'title ' => 'Children \'s Literature ' ,
@@ -160,6 +189,11 @@ public static function epubFileProvider(): Iterator
160189 'description ' => '' ,
161190 'publisher ' => '' ,
162191 'language ' => 'en ' ,
192+ 'subject ' => 'Children -- Books and reading ' ,
193+ 'date ' => '2008-05-20 ' ,
194+ 'identifiers ' => [
195+ 'http://www.gutenberg.org/ebooks/25545 '
196+ ],
163197 ]];
164198 yield [__DIR__ . DIRECTORY_SEPARATOR . 'fixtures ' . DIRECTORY_SEPARATOR . 'valid_6.epub ' , true , [
165199 'title ' => '500 Rätsel und Rätselscherze für jung und alt / Ein Bringmichraus für Schul und Haus ' ,
@@ -169,20 +203,35 @@ public static function epubFileProvider(): Iterator
169203 'description ' => '' ,
170204 'publisher ' => '' ,
171205 'language ' => 'de ' ,
206+ 'subject ' => 'Puzzles ' ,
207+ 'date ' => '2010-02-15 ' ,
208+ 'identifiers ' => [
209+ 'http://www.gutenberg.org/31281 '
210+ ],
172211 ]];
173212 yield [__DIR__ . DIRECTORY_SEPARATOR . 'fixtures ' . DIRECTORY_SEPARATOR . 'invalid.epub ' , false , [
174213 'title ' => '' ,
175214 'authors ' => [],
176215 'description ' => '' ,
177216 'publisher ' => '' ,
178217 'language ' => '' ,
218+ 'subject ' => '' ,
219+ 'date ' => '' ,
220+ 'identifiers ' => [
221+ ''
222+ ],
179223 ]];
180224 yield [__DIR__ . DIRECTORY_SEPARATOR . 'fixtures ' . DIRECTORY_SEPARATOR . 'nonexistent.epub ' , false , [
181225 'title ' => '' ,
182226 'authors ' => [],
183227 'description ' => '' ,
184228 'publisher ' => '' ,
185229 'language ' => '' ,
230+ 'subject ' => '' ,
231+ 'date ' => '' ,
232+ 'identifiers ' => [
233+ ''
234+ ],
186235 ]];
187236 }
188237
0 commit comments