コード例 #1
0
ファイル: FileTest.php プロジェクト: shabbirvividads/magento2
 public function testGetContent()
 {
     $this->source->expects($this->exactly(2))->method('getContent')->with($this->object)->will($this->returnValue('content'));
     $this->assertEquals('content', $this->object->getContent());
     $this->assertEquals('content', $this->object->getContent());
     // no in-memory caching for content
 }
コード例 #2
0
ファイル: FileTest.php プロジェクト: nja78/magento2
 /**
  * @expectedException \Magento\Framework\View\Asset\File\NotFoundException
  * @expectedExceptionMessage Unable to get content for 'Magento_Module/dir/file.css'
  */
 public function testGetContentNotFound()
 {
     $this->source->expects($this->once())
         ->method('getContent')
         ->with($this->object)
         ->will($this->returnValue(false));
     $this->object->getContent();
 }