Skip to content

Commit

Permalink
Changes for xdebug support in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wapmorgan committed Nov 20, 2022
1 parent 2a22f41 commit 834b8b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ RUN docker-php-source extract \
&& git clone https://github.com/codemasher/php-ext-xz.git && cd php-ext-xz && phpize && ./configure \
&& make && make install && cd ../ && rm -rf php-ext-xz \
&& docker-php-source delete
RUN docker-php-ext-install bz2 zip
RUN docker-php-ext-enable rar xz xdebug
RUN docker-php-ext-install bz2 zip && docker-php-ext-enable rar xz xdebug

RUN echo "xdebug.mode = debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer -O - -q | php -- --quiet --install-dir=/usr/local/bin --filename=composer
4 changes: 2 additions & 2 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ build:
docker build --tag php:ua tests/

test:
docker run --rm --interactive --tty --volume $(PWD):/app -w /app -e XDEBUG_MODE=coverage php:ua ./vendor/bin/phpunit --coverage-text
docker run --rm --interactive --tty --volume $(PWD):/app -w /app -e XDEBUG_MODE=coverage --add-host=host.docker.internal:host-gateway php:ua ./vendor/bin/phpunit --coverage-text

run:
docker run --rm --interactive --tty --volume $(PWD):/app -w /app php:ua bash
docker run --rm --interactive --tty --volume $(PWD):/app -w /app --add-host=host.docker.internal:host-gateway php:ua bash

0 comments on commit 834b8b2

Please sign in to comment.