File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
tests/PhpPresentation/Tests/Writer/PowerPoint2007 Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace PhpPresentation \Tests \Writer \PowerPoint2007 ;
4
+
5
+ use PhpOffice \PhpPresentation \Writer \PowerPoint2007 \PptSlideMasters ;
6
+ use PhpOffice \PhpPresentation \Slide \SlideLayout ;
7
+
8
+ /**
9
+ * Test class for PowerPoint2007
10
+ *
11
+ * @coversDefaultClass PowerPoint2007
12
+ */
13
+ class PptSlideMastersTest extends \PHPUnit_Framework_TestCase
14
+ {
15
+ public function testWriteSlideMasterRelationships ()
16
+ {
17
+ $ writer = new PptSlideMasters ();
18
+ $ slideMaster = $ this ->getMockBuilder ('PhpOffice \\PhpPresentation \\Slide \\SlideMaster ' )
19
+ ->setMethods (['getAllSlideLayouts ' , 'getRelsIndex ' , 'getShapeCollection ' ])
20
+ ->getMock ();
21
+
22
+ $ layouts = [new SlideLayout ($ slideMaster )];
23
+
24
+ $ slideMaster ->expects ($ this ->once ())
25
+ ->method ('getAllSlideLayouts ' )
26
+ ->will ($ this ->returnValue ($ layouts ));
27
+
28
+ $ slideMaster ->expects ($ this ->exactly (2 ))
29
+ ->method ('getShapeCollection ' )
30
+ ->will ($ this ->returnValue (new \ArrayObject ()));
31
+
32
+ $ data = $ writer ->writeSlideMasterRelationships ($ slideMaster );
33
+ }
34
+ }
You can’t perform that action at this time.
0 commit comments