MediaWiki  1.23.1
LessFileCompilationTest.php
Go to the documentation of this file.
1 <?php
2 
10 
14  protected $file;
15 
20  protected $module;
21 
29  public function __construct( $file, ResourceLoaderModule $module ) {
30  if ( !is_string( $file ) || !is_file( $file ) || !is_readable( $file ) ) {
31  throw PHPUnit_Util_InvalidArgumentHelper::factory( 1, 'readable file' );
32  }
33 
34  parent::__construct( 'testLessFileCompilation' );
35 
36  $this->file = $file;
37  $this->module = $module;
38  }
39 
40  public function testLessFileCompilation() {
41  $compiler = ResourceLoader::getLessCompiler();
42  $this->assertNotNull( $compiler->compileFile( $this->file ) );
43  }
44 
45  public function getName( $withDataSet = true ) {
46  return $this->toString();
47  }
48 
49  public function toString() {
50  $moduleName = $this->module->getName();
51 
52  return "{$this->file} in the \"{$moduleName}\" module";
53  }
54 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
LessFileCompilationTest\getName
getName( $withDataSet=true)
Definition: LessFileCompilationTest.php:43
file
We ve cleaned up the code here by removing clumps of infrequently used code and moving them off somewhere else It s much easier for someone working with this code to see what s _really_ going and make changes or fix bugs In we can take all the code that deals with the little used title reversing we can concentrate it all in an extension file
Definition: hooks.txt:93
LessFileCompilationTest\testLessFileCompilation
testLessFileCompilation()
Definition: LessFileCompilationTest.php:38
MediaWikiTestCase
Definition: MediaWikiTestCase.php:6
LessFileCompilationTest\$module
ResourceLoaderModule $module
The ResourceLoader module that contains the file.
Definition: LessFileCompilationTest.php:18
LessFileCompilationTest\toString
toString()
Definition: LessFileCompilationTest.php:47
LessFileCompilationTest\__construct
__construct( $file, ResourceLoaderModule $module)
Definition: LessFileCompilationTest.php:27
ResourceLoader\getLessCompiler
static getLessCompiler()
Returns LESS compiler set up for use with MediaWiki.
Definition: ResourceLoader.php:1290
LessFileCompilationTest
Modelled on Sebastian Bergmann's PHPUnit_Extensions_PhptTestCase class.
Definition: LessFileCompilationTest.php:9
ResourceLoaderModule
Abstraction for resource loader modules, with name registration and maxage functionality.
Definition: ResourceLoaderModule.php:28
LessFileCompilationTest\$file
string $file
$file
Definition: LessFileCompilationTest.php:13