Skip to content

Commit

Permalink
Merge pull request #1029 from mockery/add-php74-to-makefile
Browse files Browse the repository at this point in the history
Add php74 to makefile
  • Loading branch information
davedevelopment committed Feb 19, 2020
2 parents 9c6dab9 + 8b9f6d7 commit ff980c3
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 6 deletions.
36 changes: 30 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ docs/api/index.html: vendor/composer/installed.json $(library_files) phpDocument
php phpDocumentor.phar run -d library -t docs/api

.PHONY: test-all
test-all: test-73 test-72 test-71 test-70 test-56
test-all: test-74 test-73 test-72 test-71 test-70 test-56

.PHONY: test-all-7
test-all-7: test-73 test-72 test-71 test-70
test-all-7: test-74 test-73 test test-71 test-70

.PHONY: test-74
test-74: deps
docker run -it --rm -v "$$PWD":/opt/mockery -w /opt/mockery php:7.4-cli php vendor/bin/phpunit

.PHONY: test-73
test-73: deps
Expand All @@ -34,12 +38,32 @@ test-72: deps
docker run -it --rm -v "$$PWD":/opt/mockery -w /opt/mockery php:7.2-cli php vendor/bin/phpunit

.PHONY: test-71
test-71: deps
docker run -it --rm -v "$$PWD":/opt/mockery -w /opt/mockery php:7.1-cli php vendor/bin/phpunit
test-71: build71
docker run -it --rm \
-v "$$PWD/library":/opt/mockery/library \
-v "$$PWD/tests":/opt/mockery/tests \
-v "$$PWD/phpunit.xml.dist":/opt/mockery/phpunit.xml \
-w /opt/mockery \
mockery_php71 \
php vendor/bin/phpunit

.PHONY: build71
build71:
docker build -t mockery_php71 -f "$$PWD/docker/php71/Dockerfile" .

.PHONY: test-70
test-70: deps
docker run -it --rm -v "$$PWD":/opt/mockery -w /opt/mockery php:7.0-cli php vendor/bin/phpunit
test-70: build70
docker run -it --rm \
-v "$$PWD/library":/opt/mockery/library \
-v "$$PWD/tests":/opt/mockery/tests \
-v "$$PWD/phpunit.xml.dist":/opt/mockery/phpunit.xml \
-w /opt/mockery \
mockery_php70 \
php vendor/bin/phpunit

.PHONY: build70
build70:
docker build -t mockery_php70 -f "$$PWD/docker/php70/Dockerfile" .

.PHONY: test-56
test-56: build56
Expand Down
14 changes: 14 additions & 0 deletions docker/php70/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM php:7.0-cli

RUN apt-get update && \
apt-get install -y git zip unzip && \
apt-get -y autoremove && \
apt-get clean && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

WORKDIR /opt/mockery

COPY composer.json ./

RUN composer install
14 changes: 14 additions & 0 deletions docker/php71/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM php:7.1-cli

RUN apt-get update && \
apt-get install -y git zip unzip && \
apt-get -y autoremove && \
apt-get clean && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

WORKDIR /opt/mockery

COPY composer.json ./

RUN composer install
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
use Mockery\Generator\DefinedTargetClass;
use Mockery\Generator\StringManipulation\Pass\MagicMethodTypeHintsPass;

/**
* @requires PHP 7.0.0-dev
*/
class MagicMethodTypeHintsPassTest extends MockeryTestCase
{
/**
Expand Down
3 changes: 3 additions & 0 deletions tests/PHP70/MockingParameterAndReturnTypesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

use Mockery\Adapter\Phpunit\MockeryTestCase;

/**
* @requires PHP 7.0.0-dev
*/
class MockingParameterAndReturnTypesTest extends MockeryTestCase
{
public function testMockingStringReturnType()
Expand Down

0 comments on commit ff980c3

Please sign in to comment.