}
public static function provideGetPageUrl() {
- //NOTE: the assumption that the URL is built by replacing $1
+ // NOTE: the assumption that the URL is built by replacing $1
// with the urlencoded version of $page
// is true for Site but not guaranteed for subclasses.
// Subclasses need to override this provider appropriately.
- return array(
- array( #0
+ return [
+ [ # 0
'http://acme.test/TestPath/$1',
'Foo',
'/TestPath/Foo',
- ),
- array( #1
+ ],
+ [ # 1
'http://acme.test/TestScript?x=$1&y=bla',
'Foo',
'TestScript?x=Foo&y=bla',
- ),
- array( #2
+ ],
+ [ # 2
'http://acme.test/TestPath/$1',
'foo & bar/xyzzy (quux-shmoox?)',
'/TestPath/foo%20%26%20bar%2Fxyzzy%20%28quux-shmoox%3F%29',
- ),
- );
+ ],
+ ];
}
/**
public function testGetPageUrl( $path, $page, $expected ) {
$site = new Site();
- //NOTE: the assumption that getPageUrl is based on getLinkPath
+ // NOTE: the assumption that getPageUrl is based on getLinkPath
// is true for Site but not guaranteed for subclasses.
// Subclasses need to override this test case appropriately.
$site->setLinkPath( $path );