From 78e78243f7a7f0a677f6a884ccde665f29efa6cc Mon Sep 17 00:00:00 2001 From: Zachary Klosko Date: Tue, 22 Dec 2020 10:22:46 -0500 Subject: [PATCH] Using fixed date in tests, removing extra dependencies --- .github/scripts/install-bionic.sh | 9 +-------- .github/scripts/install-xenial.sh | 9 +-------- .../tests/application/models/unit/ScheduleUnitTest.php | 4 ++-- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/scripts/install-bionic.sh b/.github/scripts/install-bionic.sh index 942c0a07e..ef7416abe 100644 --- a/.github/scripts/install-bionic.sh +++ b/.github/scripts/install-bionic.sh @@ -22,14 +22,7 @@ apt-get install -y gstreamer1.0-plugins-base \ python3-gi-cairo \ python-cairo \ pkg-config \ - libcairo2-dev \ - php-curl \ - php-gd \ - php-pgsql \ - php-apcu \ - php-bcmath \ - php-mbstring \ - php-pear + libcairo2-dev # Making directory; not sure why... mkdir -p /tmp/log/libretime \ No newline at end of file diff --git a/.github/scripts/install-xenial.sh b/.github/scripts/install-xenial.sh index b89e397d2..ef7416abe 100644 --- a/.github/scripts/install-xenial.sh +++ b/.github/scripts/install-xenial.sh @@ -22,14 +22,7 @@ apt-get install -y gstreamer1.0-plugins-base \ python3-gi-cairo \ python-cairo \ pkg-config \ - libcairo2-dev \ - php7.0-curl \ - php7.0-gd \ - php7.0-pgsql \ - php-apcu \ - php-bcmath \ - php-mbstring \ - php-pear + libcairo2-dev # Making directory; not sure why... mkdir -p /tmp/log/libretime \ No newline at end of file diff --git a/airtime_mvc/tests/application/models/unit/ScheduleUnitTest.php b/airtime_mvc/tests/application/models/unit/ScheduleUnitTest.php index 2c9921bf3..c29fa1e33 100644 --- a/airtime_mvc/tests/application/models/unit/ScheduleUnitTest.php +++ b/airtime_mvc/tests/application/models/unit/ScheduleUnitTest.php @@ -23,7 +23,7 @@ class ScheduleUnitTest extends Zend_Test_PHPUnit_ControllerTestCase //PHPUnit_Fr $testShowData = ShowServiceData::getNoRepeatNoRRData(); $showService = new Application_Service_ShowService(); - $futureDate = new DateTime(); + $futureDate = new DateTime('2040-01-01T12:00:00.012345Z'); $futureDate->add(new DateInterval('P1Y')); //1 year into the future $futureDateString = $futureDate->format('Y-m-d'); @@ -35,7 +35,7 @@ class ScheduleUnitTest extends Zend_Test_PHPUnit_ControllerTestCase //PHPUnit_Fr //value will prevent anything from actually being scheduled. Normally this isn't //a problem because as soon as you view the calendar for the first time, this is //set to a week ahead in the future. - $populateUntil = new DateTime("now", new DateTimeZone('UTC')); + $populateUntil = new DateTime('2040-01-01T12:00:00.012345Z', new DateTimeZone('UTC')); $populateUntil = $populateUntil->add(new DateInterval("P2Y")); //2 years ahead in the future. Application_Model_Preference::SetShowsPopulatedUntil($populateUntil);