-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from pamil/phpspec-4
Support for phpspec 4.0
- Loading branch information
Showing
5 changed files
with
43 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace spec\Akeneo\Runner\Maintainer; | ||
|
||
use Akeneo\Runner\Maintainer\SkipExampleMaintainer; | ||
|
@@ -15,7 +17,7 @@ | |
/** | ||
* @mixin SkipExampleMaintainer | ||
*/ | ||
class SkipExampleMaintainerSpec extends ObjectBehavior | ||
final class SkipExampleMaintainerSpec extends ObjectBehavior | ||
{ | ||
function it_is_a_maintainer() | ||
{ | ||
|
@@ -27,14 +29,14 @@ function its_priority_is_75() | |
$this->getPriority()->shouldBe(75); | ||
} | ||
|
||
function it_supports_specification_that_has_doc_comment( | ||
function it_supports_specification_that_has_require_doc_comment( | ||
ExampleNode $example, | ||
SpecificationNode $specification, | ||
\ReflectionClass $refClass | ||
) { | ||
$example->getSpecification()->willReturn($specification); | ||
$specification->getClassReflection()->willReturn($refClass); | ||
$refClass->getDocComment()->willReturn('doc comment'); | ||
$refClass->getDocComment()->willReturn("/**\n * @require Foo\\Bar\n */"); | ||
|
||
$this->supports($example)->shouldBe(true); | ||
} | ||
|
@@ -79,7 +81,7 @@ function its_prepare_method_does_not_throw_exception_when_specification_requires | |
$specification->getClassReflection()->willReturn($refClass); | ||
$refClass->getDocComment()->willReturn("/**\n * @require Akeneo\Runner\Maintainer\SkipExampleMaintainer\n */"); | ||
|
||
$this->shouldNotThrow('PhpSpec\Exception\Example\SkippingException')->duringPrepare($example, $context, $matchers, $collaborators); | ||
$this->shouldNotThrow(SkippingException::class)->duringPrepare($example, $context, $matchers, $collaborators); | ||
} | ||
|
||
function its_prepare_method_does_not_throw_exception_when_specification_requires_an_existing_interface( | ||
|
@@ -94,7 +96,7 @@ function its_prepare_method_does_not_throw_exception_when_specification_requires | |
$specification->getClassReflection()->willReturn($refClass); | ||
$refClass->getDocComment()->willReturn("/**\n * @require PhpSpec\Runner\Maintainer\Maintainer\n */"); | ||
|
||
$this->shouldNotThrow('PhpSpec\Exception\Example\SkippingException')->duringPrepare($example, $context, $matchers, $collaborators); | ||
$this->shouldNotThrow(SkippingException::class)->duringPrepare($example, $context, $matchers, $collaborators); | ||
} | ||
|
||
function its_prepare_method_ignores_other_annotation( | ||
|
@@ -104,11 +106,11 @@ function its_prepare_method_ignores_other_annotation( | |
Specification $context, | ||
MatcherManager $matchers, | ||
CollaboratorManager $collaborators | ||
){ | ||
) { | ||
$example->getSpecification()->willReturn($specification); | ||
$specification->getClassReflection()->willReturn($refClass); | ||
$refClass->getDocComment()->willReturn("/**\n * @author [email protected] \n */"); | ||
|
||
$this->shouldNotThrow('PhpSpec\Exception\Example\SkippingException')->duringPrepare($example, $context, $matchers, $collaborators); | ||
$this->shouldNotThrow(SkippingException::class)->duringPrepare($example, $context, $matchers, $collaborators); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters