File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+ workflow_dispatch :
9+
10+ jobs :
11+ islandora-module-ci :
12+ uses : digitalutsc/reusable_workflows/.github/workflows/islandora-module-ci.yml@main
13+ with :
14+ module_name : serve_iiif_file
15+ install_chromedriver : true
Original file line number Diff line number Diff line change 22 "name" : " islandora_lite/serve_iiif_file" ,
33 "type" : " drupal-module" ,
44 "description" : " Gets static IIIF files for the Islandora mirador viewer" ,
5- "keywords" : [" Drupal" ]
5+ "keywords" : [" Drupal" ],
6+ "require" : {}
67}
Original file line number Diff line number Diff line change 11type : module
22name : Serve IIIF File
33description : Serve iiif files which can be configured in the backend.
4- core_version_requirement : ^8 || ^9 || ^10
4+ core_version_requirement : ^8 || ^9 || ^10 || ^11
Original file line number Diff line number Diff line change @@ -8,4 +8,4 @@ serve_iiif_file.content:
88 options :
99 parameters :
1010 book_node :
11- type : entity:node
11+ type : entity:node
Original file line number Diff line number Diff line change 99use Symfony \Component \HttpFoundation \Response ;
1010
1111/**
12- *
12+ * Controller for serving IIIF manifest files.
1313 */
1414class ServeIIIFFileController {
1515
1616 /**
17- *
17+ * Serves IIIF manifest files.
1818 */
1919 public function content (NodeInterface $ book_node ) {
2020
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Drupal \Tests \serve_iiif_file \Functional ;
4+
5+ use Drupal \Tests \BrowserTestBase ;
6+ use PHPUnit \Framework \Attributes \RunTestsInSeparateProcesses ;
7+
8+ /**
9+ * Simple test to ensure that main page loads with module enabled.
10+ *
11+ * @group serve_iiif_file
12+ */
13+ #[RunTestsInSeparateProcesses]
14+ class LoadTest extends BrowserTestBase {
15+
16+ /**
17+ * {@inheritdoc}
18+ */
19+ protected $ defaultTheme = 'stark ' ;
20+
21+ /**
22+ * Modules to enable.
23+ *
24+ * @var array
25+ */
26+ protected static $ modules = ['serve_iiif_file ' ];
27+
28+ /**
29+ * A user with permissions required to access the configuration form.
30+ *
31+ * @var \Drupal\user\UserInterface
32+ */
33+ protected $ user ;
34+
35+ /**
36+ * {@inheritdoc}
37+ */
38+ protected function setUp (): void {
39+ parent ::setUp ();
40+ $ this ->user = $ this ->drupalCreateUser ([
41+ 'access administration pages ' ,
42+ 'administer site configuration ' ,
43+ ]);
44+ $ this ->drupalLogin ($ this ->user );
45+ }
46+
47+ /**
48+ * Tests that the home page loads with a 200 response.
49+ */
50+ public function testLoad (): void {
51+ $ this ->drupalGet ('<front> ' );
52+ $ this ->assertSession ()->statusCodeEquals (200 );
53+ }
54+
55+ }
You can’t perform that action at this time.
0 commit comments