Skip to content

Commit

Permalink
Skip the Factory specs for sebastian/comparator 5+
Browse files Browse the repository at this point in the history
This deprecated class is not compatible with the new major version of
sebastian/comparator.
  • Loading branch information
stof committed Jun 20, 2023
1 parent 58fdc1a commit df9269a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/Prophecy/Comparator/FactorySpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,23 @@

namespace spec\Prophecy\Comparator;

use PhpSpec\Exception\Example\SkippingException;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Prophecy\Comparator\Factory;
use SebastianBergmann\Comparator\Factory as BaseFactory;

class FactorySpec extends ObjectBehavior
{
function let()
{
$ref = new \ReflectionClass(BaseFactory::class);

if ($ref->isFinal()) {
throw new SkippingException(sprintf('The deprecated "%s" class cannot be used with sebastian/comparator 5+.', Factory::class));
}
}

function it_extends_Sebastian_Comparator_Factory()
{
$this->shouldHaveType('SebastianBergmann\Comparator\Factory');
Expand Down

0 comments on commit df9269a

Please sign in to comment.