12 [
false,
'http://example.org',
'http://mediawiki.org' ],
14 [
true,
'http://example.org',
'http://example.org' ],
15 [
true,
'https://example.org',
'https://example.org' ],
16 [
true,
'//example.org',
'//example.org' ],
18 [
true,
'http://example.org',
'http://EXAMPLE.ORG' ],
20 [
true,
'http://example.org',
'http://example.org/wiki/Main_Page' ],
21 [
true,
'http://example.org',
'http://example.org?my=query' ],
22 [
true,
'http://example.org',
'http://example.org#its-a-fragment' ],
24 [
false,
'http://example.org',
'https://example.org' ],
25 [
false,
'https://example.org',
'http://example.org' ],
27 [
true,
'//example.org',
'http://example.org' ],
28 [
true,
'//example.org',
'https://example.org' ],
30 [
false,
'//example.org',
'irc://example.org' ],
50 $po->setExtensionData(
"one",
"Foo" );
52 $this->assertEquals(
"Foo", $po->getExtensionData(
"one" ) );
53 $this->assertNull( $po->getExtensionData(
"spam" ) );
55 $po->setExtensionData(
"two",
"Bar" );
56 $this->assertEquals(
"Foo", $po->getExtensionData(
"one" ) );
57 $this->assertEquals(
"Bar", $po->getExtensionData(
"two" ) );
59 $po->setExtensionData(
"one",
null );
60 $this->assertNull( $po->getExtensionData(
"one" ) );
61 $this->assertEquals(
"Bar", $po->getExtensionData(
"two" ) );
73 $po->setProperty(
'foo',
'val' );
75 $properties = $po->getProperties();
76 $this->assertEquals( $po->getProperty(
'foo' ),
'val' );
77 $this->assertEquals( $properties[
'foo'],
'val' );
79 $po->setProperty(
'foo',
'second val' );
81 $properties = $po->getProperties();
82 $this->assertEquals( $po->getProperty(
'foo' ),
'second val' );
83 $this->assertEquals( $properties[
'foo'],
'second val' );
85 $po->unsetProperty(
'foo' );
87 $properties = $po->getProperties();
88 $this->assertEquals( $po->getProperty(
'foo' ),
false );
89 $this->assertArrayNotHasKey(
'foo', $properties );