File tree Expand file tree Collapse file tree 5 files changed +28
-10
lines changed
Expand file tree Collapse file tree 5 files changed +28
-10
lines changed Original file line number Diff line number Diff line change @@ -234,13 +234,6 @@ COPY --from=mongodb /usr/local/lib/php/extensions/no-debug-non-zts-20240924/mong
234234# Enable Extensions
235235RUN docker-php-ext-enable swoole redis imagick yaml maxminddb scrypt zstd brotli lz4 snappy opentelemetry protobuf gd mongodb
236236
237- # Install Composer
238- RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
239-
240- # Copy composer.json and install dependencies
241- COPY composer.json /usr/src/code/composer.json
242- RUN composer install --no-dev --working-dir=/usr/src/code
243-
244237# Copy test files
245238COPY tests /tests
246239
Original file line number Diff line number Diff line change @@ -82,9 +82,11 @@ commandTests:
8282 expectedOutput :
8383 - " Zip 3.0 \\ (July 5th 2008\\ )"
8484 - name : ' utopia-php/image PNG to WebP conversion'
85- command : " php "
86- args : ["/tests/image-conversion-test.php "]
85+ command : " sh "
86+ args : ["/tests/run- image-conversion-test.sh "]
8787 expectedOutput :
88+ - " Installing Composer..."
89+ - " Installing dependencies..."
8890 - " Test 1: Converting PNG to WebP..."
8991 - " ✓ PNG to WebP conversion successful"
9092 - " Test 2: Converting WebP to PNG..."
File renamed without changes.
Original file line number Diff line number Diff line change 11<?php
22
3- require_once '/usr/src/code /vendor/autoload.php ' ;
3+ require_once '/tests /vendor/autoload.php ' ;
44
55use Utopia \Image \Image ;
66
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # Install Composer if not already installed
4+ if ! command -v composer > /dev/null 2>&1 ; then
5+ echo " Installing Composer..."
6+ curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
7+ if [ $? -ne 0 ]; then
8+ echo " ✗ Failed to install Composer"
9+ exit 1
10+ fi
11+ fi
12+
13+ # Install dependencies
14+ echo " Installing dependencies..."
15+ cd /tests
16+ composer install --no-dev --quiet
17+ if [ $? -ne 0 ]; then
18+ echo " ✗ Failed to install dependencies"
19+ exit 1
20+ fi
21+
22+ # Run the test
23+ php /tests/image-conversion-test.php
You can’t perform that action at this time.
0 commit comments