diff --git a/composer.json b/composer.json index db60c7c..d3acb55 100644 --- a/composer.json +++ b/composer.json @@ -3,24 +3,17 @@ "name": "pre/immutable-classes", "license": "MIT", "require": { - "pre/plugin": "^0.7.3" + "pre/plugin": "^0.10.0" }, "autoload": { "psr-4": { - "Pre\\ImmutableClasses\\": "src" + "Pre\\ImmutableClasses\\": "source" } }, "require-dev": { "phpunit/phpunit": "^5.0|^6.0" }, - "autoload-dev": { - "psr-4": { - "Pre\\ImmutableClasses\\": "tests" - } - }, "extra": { - "macros": [ - "src/macros.yay" - ] + "macros": ["source/macros.yay"] } } 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 __DIR__ . "/specs"; + return "handleCallImmutableClassSetters($method, $parameters)) { - return $result·1; + if ($result = $this->handleCallImmutableClassSetters($method, $parameters)) { + return $result; } print "fallback"; diff --git a/tests/specs/immutability.spec b/tests/specs/immutability.spec index f37894e..53b3ef7 100644 --- a/tests/specs/immutability.spec +++ b/tests/specs/immutability.spec @@ -1,15 +1,9 @@ ---DESCRIPTION-- - -Test immutability - ---GIVEN-- - immutable class MyImmutableClass { - // nothign to see here + // nothing to see here } ---EXPECT-- +~~~ class MyImmutableClass {