Source of file TestFrontendProxy.php
Size: 0,549 Bytes - Last Modified: 2021-12-23T10:26:52+00:00
/var/www/docs.ssmods.com/process/src/code/tests/TestFrontendProxy.php
12345678910111213141516171819202122232425262728 | <?php /** * * @author <marcus@silverstripe.com.au> * @license BSD License http://www.silverstripe.org/bsd-license */ class TestFrontendProxy extends SapphireTest { public function testProxyRuleMatch() { $config = array( 'products/.*?(\d+)$' => array( 'default' => 7200, 'tags' => array('product', 1), ) ); $url = '/bathroom/products/some-kind-of-product-12345'; $proxy = new FrontendProxy(null, null, $config); $conf = $proxy->configForUrl($url); $this->assertEquals($conf['tags'][1], '12345'); } } |