From 697a7bbc76a69b64cfd2a4fcdf3cb1cd18ee5339 Mon Sep 17 00:00:00 2001 From: Christopher Pitt Date: Sat, 28 Oct 2017 23:43:46 +0300 Subject: [PATCH 1/2] Refactor for new plugin --- composer.json | 25 ++++++++++----------- phpunit.xml | 2 +- {src => source}/expanders.php | 0 {src => source}/macros.yay | 0 tests/MacroTest.php | 41 ++++++++++++++++++++++++++++++----- tests/bootstrap.php | 7 ------ tests/specs/six.spec | 8 +------ 7 files changed, 50 insertions(+), 33 deletions(-) rename {src => source}/expanders.php (100%) rename {src => source}/macros.yay (100%) delete mode 100644 tests/bootstrap.php diff --git a/composer.json b/composer.json index e799d31..2d48384 100644 --- a/composer.json +++ b/composer.json @@ -2,25 +2,24 @@ "type": "pre-macro", "name": "pre/six", "license": "MIT", + "repositories": [ + { + "type": "path", + "url": "../pre-plugin" + } + ], "require": { - "pre/plugin": "^0.7.3" + "pre/plugin": "*" }, "autoload": { - "files": [ - "src/expanders.php" - ] + "files": ["source/expanders.php"] }, "require-dev": { "phpunit/phpunit": "^5.0|^6.0" }, - "autoload-dev": { - "psr-4": { - "Pre\\Six\\": "tests" - } - }, "extra": { - "macros": [ - "src/macros.yay" - ] - } + "macros": ["source/macros.yay"] + }, + "minimum-stability": "dev", + "prefer-stable": true } diff --git a/phpunit.xml b/phpunit.xml index 829414b..5543800 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -2,7 +2,7 @@ format($from))); + $this->assertEquals($this->format($expected), $actual); + } + + private function format($code) + { + return " Date: Sun, 29 Oct 2017 00:16:56 +0300 Subject: [PATCH 2/2] Use tagged plugin --- composer.json | 12 ++---------- tests/MacroTest.php | 2 -- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/composer.json b/composer.json index 2d48384..51b157c 100644 --- a/composer.json +++ b/composer.json @@ -2,14 +2,8 @@ "type": "pre-macro", "name": "pre/six", "license": "MIT", - "repositories": [ - { - "type": "path", - "url": "../pre-plugin" - } - ], "require": { - "pre/plugin": "*" + "pre/plugin": "^0.10.0" }, "autoload": { "files": ["source/expanders.php"] @@ -19,7 +13,5 @@ }, "extra": { "macros": ["source/macros.yay"] - }, - "minimum-stability": "dev", - "prefer-stable": true + } } diff --git a/tests/MacroTest.php b/tests/MacroTest.php index ab8e9b9..c27214a 100644 --- a/tests/MacroTest.php +++ b/tests/MacroTest.php @@ -2,8 +2,6 @@ use PHPUnit\Framework\TestCase; -putenv("PRE_BASE_DIR=" . realpath(__DIR__ . "/../")); - class MacroTest extends TestCase { /**