Esempio n. 1
0
 private function getFontCollectionWithLoaderAndOneFont()
 {
     $fontCollection = new FontCollection();
     $font = $this->getMockBuilder('Cmfcmf\\Module\\MediaModule\\Font\\FontInterface')->getMock();
     $font->expects($this->any())->method('getId')->willReturn('fontID');
     $font->expects($this->any())->method('getGoogleFontName')->willReturn('googleName');
     $font->expects($this->any())->method('getTitle')->willReturn('fontTitle');
     $fontLoader = $this->getMockBuilder('Cmfcmf\\Module\\MediaModule\\Font\\FontLoaderInterface')->getMock();
     $fontLoader->expects($this->once())->method('loadFonts')->willReturn([$font]);
     $fontCollection->addFontLoader($fontLoader);
     return $fontCollection;
 }