Linux anchor 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
Apache/2.4.18 (Ubuntu)
Server IP : 10.10.100.4 & Your IP : 216.73.217.150
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
backup /
extensions /
Gadgets /
Delete
Unzip
Name
Size
Permission
Date
Action
ApiQueryGadgetCategories.php
3.28
KB
-rw-r--r--
2011-09-12 17:10
ApiQueryGadgets.php
5.95
KB
-rw-r--r--
2011-09-16 16:24
Gadgets.alias.php
6.66
KB
-rw-r--r--
2011-05-14 02:11
Gadgets.i18n.php
205.41
KB
-rw-r--r--
2011-07-16 22:06
Gadgets.php
2.06
KB
-rw-r--r--
2011-09-18 13:21
Gadgets_body.php
14.85
KB
-rw-r--r--
2011-10-26 00:15
Gadgets_tests.php
2.79
KB
-rw-r--r--
2011-05-21 13:23
README
1.8
KB
-rw-r--r--
2011-04-12 20:09
SpecialGadgets.php
4.69
KB
-rw-r--r--
2011-06-13 20:37
install.settings
40
B
-rw-r--r--
2008-02-04 09:08
Save
Rename
<?php /** * @group Gadgets */ class GadgetsTest extends PHPUnit_Framework_TestCase { private function create( $line ) { $g = Gadget::newFromDefinition( $line ); // assertInstanceOf() is available since PHPUnit 3.5 $this->assertEquals( 'Gadget', get_class( $g ) ); return $g; } function testInvalidLines() { $this->assertFalse( Gadget::newFromDefinition( '' ) ); $this->assertFalse( Gadget::newFromDefinition( '<foo|bar>' ) ); } function testSimpleCases() { $g = $this->create( '* foo bar| foo.css|foo.js|foo.bar' ); $this->assertEquals( 'foo_bar', $g->getName() ); $this->assertEquals( 'ext.gadget.foo_bar', $g->getModuleName() ); $this->assertEquals( array( 'Gadget-foo.js' ), $g->getScripts() ); $this->assertEquals( array( 'Gadget-foo.css' ), $g->getStyles() ); $this->assertEquals( array( 'Gadget-foo.js', 'Gadget-foo.css' ), $g->getScriptsAndStyles() ); $this->assertEquals( array( 'Gadget-foo.js' ), $g->getLegacyScripts() ); $this->assertFalse( $g->supportsResourceLoader() ); $this->assertTrue( $g->hasModule() ); } function testRLtag() { $g = $this->create( '*foo [ResourceLoader]|foo.js|foo.css' ); $this->assertEquals( 'foo', $g->getName() ); $this->assertTrue( $g->supportsResourceLoader() ); $this->assertEquals(0, count( $g->getLegacyScripts() ) ); } function testDependencies() { $g = $this->create( '* foo[ResourceLoader|dependencies=jquery.ui]|bar.js' ); $this->assertEquals( array( 'Gadget-bar.js' ), $g->getScripts() ); $this->assertTrue( $g->supportsResourceLoader() ); $this->assertEquals( array( 'jquery.ui' ), $g->getDependencies() ); } function testPreferences() { global $wgUser; // This test makes call to the parser which requires valids Outputpage // and Title objects. Set them up there, they will be released at the // end of the test. global $wgOut, $wgTitle; $old_wgOut = $wgOut; $old_wgTitle = $wgTitle; $wgTitle = Title::newFromText( 'Parser test for Gadgets extension' ); // Proceed with test setup: $prefs = array(); $context = new RequestContext(); $wgOut = $context->getOutput(); $wgOut->setTitle( Title::newFromText( 'test' ) ); Gadget::loadStructuredList( '* foo | foo.js ==keep-section1== * bar| bar.js ==remove-section== * baz [rights=embezzle] |baz.js ==keep-section2== * quux [rights=read] | quux.js' ); $this->assertTrue( GadgetHooks::getPreferences( $wgUser, $prefs ), 'GetPrefences hook should return true' ); $options = $prefs['gadgets']['options']; $this->assertFalse( isset( $options['<gadget-section-remove-section>'] ), 'Must not show empty sections' ); $this->assertTrue( isset( $options['<gadget-section-keep-section1>'] ) ); $this->assertTrue( isset( $options['<gadget-section-keep-section2>'] ) ); // Restore globals $wgOut = $old_wgOut; $wgTitle = $old_wgTitle; } }