Skip to content

Commit

Permalink
Update composer dependencies (#416)
Browse files Browse the repository at this point in the history
* Upgrade dependencies

* Fix existing youtube test

* Add test for failing case

* Add playwright tests to CI

* Revert composer update

* Only update helioviewer event interface
  • Loading branch information
dgarciabriseno authored Oct 1, 2024
1 parent 45ff067 commit c451f40
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
},
"require": {
"helioviewer/event-interface": "v0.2.3",
"helioviewer/event-interface": "^0.2.4",
"matomo/device-detector": "dev-master",
"opis/json-schema": "^2.3",
"google/apiclient": "^2.16",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions tests/unit_tests/helpers/EventInterfaceTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php declare(strict_types=1);

/**
* @author Daniel Garcia-Briseno <daniel.garciabriseno@nasa.gov>
*/

use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;

require_once HV_ROOT_DIR . "/../src/Helper/EventInterface.php";

final class EventInterfaceTest extends TestCase {
/**
* Issue: https://github.com/Helioviewer-Project/helioviewer.org/issues/626
* Error was caused by Flare Scoreboard data having invalid coordinates.
* This test gets the events which were causing the error to verify that
* no error occurs anymore.
*/
#[Group('event interface')]
public function testGetEventsOnDateWithQuestionableData(): void {
// Original error was that an exception was thrown.
$this->expectNotToPerformAssertions();
Helper_EventInterface::GetEvents(
new DateTimeImmutable("2015-11-03"),
new DateInterval('P1D'),
new DateTimeImmutable('2015-11-03T15:00:00'),
);
}
}
2 changes: 2 additions & 0 deletions tests/unit_tests/movies/YoutubeUploadTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* @author Daniel Garcia-Briseno <daniel.garciabriseno@nasa.gov>
*/

require_once HV_ROOT_DIR.'/../src/Module/Movies.php';

use PHPUnit\Framework\TestCase;

final class YoutubeUploadTest extends TestCase
Expand Down

0 comments on commit c451f40

Please sign in to comment.