__invoke() public method

Output the filepath with its unix modification time as query param
public __invoke ( string $filename ) : string
$filename string
return 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);
 }