return array(
'unknown' => array( false, 'xyzzy', 'Foo' ),
'enwiki' => array( 'http://en.example.org/w/Foo', 'enwiki', 'Foo' ),
- 'ruwiki with fragement' => array(
+ 'ruwiki with fragment' => array(
'//ru.example.org/wiki/%D0%A4%D1%83#%D0%B2%D0%B0%D1%80',
'ruwiki',
'Фу',
public function provideGetCanonicalUrl() {
return array(
- 'no fragement' => array(
+ 'no fragment' => array(
'https://acme.com/wiki/Foo',
'https://acme.com',
'//acme.com',
'Foo',
null
),
- 'empty fragement' => array(
+ 'empty fragment' => array(
'https://acme.com/wiki/Foo',
'https://acme.com',
'//acme.com',
'Foo',
'Bar#Xus'
),
- 'escaped fragement' => array(
+ 'escaped fragment' => array(
'https://acme.com/wiki/Foo%23Bar',
'https://acme.com',
'//acme.com',
public function provideGetFullUrl() {
return array(
- 'no fragement' => array(
+ 'no fragment' => array(
'//acme.com/wiki/Foo',
'https://acme.com',
'//acme.com',
'Foo',
null
),
- 'empty fragement' => array(
+ 'empty fragment' => array(
'//acme.com/wiki/Foo',
'https://acme.com',
'//acme.com',
'Foo',
'Bar#Xus'
),
- 'escaped fragement' => array(
+ 'escaped fragment' => array(
'//acme.com/wiki/Foo%23Bar',
'https://acme.com',
'//acme.com',
relativePath = uri.getRelativePath();
assert.ok( relativePath.indexOf( uri.path ) >= 0, 'path in relative path' );
assert.ok( relativePath.indexOf( uri.getQueryString() ) >= 0, 'query string in relative path' );
- assert.ok( relativePath.indexOf( uri.fragment ) >= 0, 'fragement in relative path' );
+ assert.ok( relativePath.indexOf( uri.fragment ) >= 0, 'fragment in relative path' );
} );
QUnit.test( 'Parse a uri with an @ symbol in the path and query', 1, function ( assert ) {