hasExtension = m::mock(HasExtension::class); $this->fixture = new NotSpecification($this->hasExtension); } public function tearDown() : void { m::close(); } /** * @covers ::__construct * @covers ::isSatisfiedBy */ public function testIfSpecificationIsSatisfied() : void { $this->hasExtension->shouldReceive('isSatisfiedBy')->once()->andReturn(false); $this->assertTrue($this->fixture->isSatisfiedBy(['test'])); } /** * @covers ::__construct * @covers ::isSatisfiedBy */ public function testIfSpecificationIsNotSatisfied() : void { $this->hasExtension->shouldReceive('isSatisfiedBy')->once()->andReturn(true); $this->assertFalse($this->fixture->isSatisfiedBy(['test'])); } }