__invoke() 공개 메소드

Output the filepath with its unix modification time as query param
public __invoke ( string $filename ) : string
$filename string
리턴 string
예제 #1
0
 public function testSameResultWithoutCachingConfig()
 {
     $config = array('view_helper' => array('query_string' => '_', 'cache' => null));
     $filename = 'p**n-food/bac.on';
     $resolver = $this->getGenericResolver();
     $resolver->setMap(array('p**n-food/bac.on' => __FILE__));
     $helper = new Asset($resolver, null, $config);
     $newFilename = $helper->__invoke($filename);
     $this->assertSame($newFilename, $filename);
 }
예제 #2
0
 public function testForceToNotAppendTimestampWithoutCache()
 {
     $config = array('view_helper' => array('append_timestamp' => false, 'query_string' => '_', 'cache' => null));
     $filename = 'p**n-food/bac.on';
     $resolver = $this->getGenericResolver();
     $resolver->setMap(array('p**n-food/bac.on' => __FILE__));
     $helper = new Asset($resolver, null, $config);
     $newFilename = $helper->__invoke($filename);
     $this->assertNotContains('?_=', $newFilename);
     $this->assertSame($newFilename, $filename);
 }