-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
Here is the case:
final class CheckboxAttributeTypeSpec extends ObjectBehavior
{
function it_is_initializable(): void
{
$this->shouldHaveType(CheckboxAttributeType::class);
}
function it_implements_attribute_type_interface(): void
{
$this->shouldImplement(AttributeTypeInterface::class);
}
}
?>Current result
final class CheckboxAttributeTypeTest extends \PHPUnit\Framework\TestCase
{
public function testImplementsAttributeTypeInterface(): void
{
$this->assertInstanceOf(AttributeTypeInterface::class, $this->checkboxAttributeType);
}
}Expected result
final class CheckboxAttributeTypeTest extends \PHPUnit\Framework\TestCase
{
private CheckboxAttributeType $checkboxAttributeType;
protected function setUp(): void
{
$this->checkboxAttributeType = new CheckboxAttributeType();
}
function testImplementsAttributeTypeInterface(): void
{
$this->assertInstanceOf(AttributeTypeInterface::class, $this->checkboxAttributeType);
}
}Can you help me figuring why the setUp method is not created and also why the it_is_initializable is skipped?
Then I can provide a PR ;)
Metadata
Metadata
Assignees
Labels
No labels