Skip to content

Commit 5c080f7

Browse files
committed
move test
1 parent cc0e845 commit 5c080f7

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

tests/PhpPresentation/Tests/Shape/AutoShapeTest.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,26 @@ public function testNoRadiusByDefaultIsNull(): void
7171
$shape = new AutoShape();
7272
self::assertNull($shape->getRoundRectCorner());
7373
}
74+
75+
public function testRoundRectCornerPixelRadiusStoredAndAffectsHash(): void
76+
{
77+
$width = 200; // px
78+
$height = 100; // px
79+
$px1 = 5; // softer radius
80+
$px2 = 10; // larger radius
81+
82+
$shape1 = (new AutoShape())
83+
->setType(AutoShape::TYPE_ROUNDED_RECTANGLE)
84+
->setWidth($width)
85+
->setHeight($height)
86+
->setRoundRectCorner($px1);
87+
88+
$shape2 = (clone $shape1)->setRoundRectCorner($px2);
89+
90+
self::assertSame($px1, $shape1->getRoundRectCorner());
91+
self::assertSame($px2, $shape2->getRoundRectCorner());
92+
93+
// Hash must differ when radius differs
94+
self::assertNotSame($shape1->getHashCode(), $shape2->getHashCode());
95+
}
7496
}

tests/PhpPresentation/Tests/Writer/PowerPoint2007/PptSlidesTest.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -767,28 +767,6 @@ public function testParagraphSpacingBefore(): void
767767
$this->assertIsSchemaECMA376Valid();
768768
}
769769

770-
public function testRoundRectCornerPixelRadiusStoredAndAffectsHash(): void
771-
{
772-
$width = 200; // px
773-
$height = 100; // px
774-
$px1 = 5; // softer radius
775-
$px2 = 10; // larger radius
776-
777-
$shape1 = (new AutoShape())
778-
->setType(AutoShape::TYPE_ROUNDED_RECTANGLE)
779-
->setWidth($width)
780-
->setHeight($height)
781-
->setRoundRectCorner($px1);
782-
783-
$shape2 = (clone $shape1)->setRoundRectCorner($px2);
784-
785-
self::assertSame($px1, $shape1->getRoundRectCorner());
786-
self::assertSame($px2, $shape2->getRoundRectCorner());
787-
788-
// Hash must differ when radius differs
789-
self::assertNotSame($shape1->getHashCode(), $shape2->getHashCode());
790-
}
791-
792770
public function testPlaceHolder(): void
793771
{
794772
$expectedType = Placeholder::PH_TYPE_SLIDENUM;

0 commit comments

Comments
 (0)