From ef6d09c03afcf61f0f34472cb8256d7c066ca890 Mon Sep 17 00:00:00 2001 From: Ivan Chaplygin Date: Mon, 5 Jun 2023 17:18:10 +0300 Subject: [PATCH] ref #90088 fix test update Dockerfile --- .docker/Dockerfile | 2 +- tests/admin/ControllerRetailcrmAdminTest.php | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 086f7c35..97cdf874 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -2,7 +2,7 @@ FROM php:7.1-apache RUN apt-get update -RUN apt-get install -y netcat zlib1g-dev libpq-dev git libicu-dev libxml2-dev libpng-dev libjpeg-dev libmcrypt-dev libxslt-dev libfreetype6-dev \ +RUN apt-get install -y netcat zlib1g-dev libpq-dev git libicu-dev libxml2-dev libpng-dev libjpeg-dev libmcrypt-dev libxslt-dev libfreetype6-dev unzip \ && docker-php-ext-configure intl \ && docker-php-ext-install intl \ && docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \ diff --git a/tests/admin/ControllerRetailcrmAdminTest.php b/tests/admin/ControllerRetailcrmAdminTest.php index de76d0e0..fbd3d0ec 100644 --- a/tests/admin/ControllerRetailcrmAdminTest.php +++ b/tests/admin/ControllerRetailcrmAdminTest.php @@ -48,11 +48,12 @@ public function testGetAvailableTypes() $sites = $data['sites']; $types = $data['types']; - $class = new ReflectionClass(ControllerExtensionModuleRetailcrm::class); + $retailCrm = new ControllerExtensionModuleRetailcrm(self::$registry); + $class = new ReflectionClass($retailCrm); $method = $class->getMethod('getAvailableTypes'); $method->setAccessible(true); - $result = $method->invokeArgs(ControllerExtensionModuleRetailcrm::class, [$sites, $types]); + $result = $method->invokeArgs($retailCrm, [$sites, $types]); $this->assertNotEmpty($result['opencart']); $this->assertNotEmpty($result['retailcrm']); @@ -91,7 +92,7 @@ private function getDataForTestAvailableTypes(): array 'code' => 'test3' ], 'test4' => [ - 'active' => 'true', + 'active' => true, 'sites' => ['cms1', 'cms2', 'opencart'], 'code' => 'test4' ]