Пример #1
0
 public function setUp()
 {
     $timezone = new DateTimeZone(date_default_timezone_get());
     $coreExtension = $this->getMock('Twig_Extension_Core');
     $coreExtension->expects($this->any())->method('getTimezone')->will($this->returnValue($timezone));
     $this->env = $this->getMockBuilder('Twig_Environment')->disableOriginalConstructor()->getMock();
     $this->env->expects($this->any())->method('getExtension')->with('core')->will($this->returnValue($coreExtension));
 }
Пример #2
0
 public function setUp()
 {
     $this->env = $this->getMock('Twig_Environment');
     $this->env->expects($this->any())->method('getCharset')->will($this->returnValue('utf-8'));
 }
Пример #3
0
 public function setUp()
 {
     $this->env = $this->getMockBuilder('Twig_Environment')->disableOriginalConstructor()->getMock();
     $this->env->expects($this->any())->method('getCharset')->will($this->returnValue('utf-8'));
 }