File tree Expand file tree Collapse file tree
tests/PhpPresentation/Tests Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments