PHP Classes

File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace.test

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Lego PHP   Library/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace.test   Download  
File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace.test
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Lego PHP
Blog and shopping cart system
Author: By
Last change:
Date: 7 years ago
Size: 455 bytes
 

Contents

Class file image Download
--TEST-- "replace" filter --TEMPLATE-- {{ "I liké %this% and %that%."|replace({'%this%': "foo", '%that%': "bar"}) }} {{ 'I like single replace operation only %that%'|replace({'%that%' : '%that%1'}) }} {{ 'I like %this% and %that%.'|replace(traversable) }} --DATA-- return array('traversable' => new ArrayObject(array('%this%' => 'foo', '%that%' => 'bar'))) --EXPECT-- I liké foo and bar. I like single replace operation only %that%1 I like foo and bar.