MediaWiki  master
ExifRotationTest Class Reference

Tests related to auto rotation. More...

Inheritance diagram for ExifRotationTest:
Collaboration diagram for ExifRotationTest:

Public Member Functions

 testBitmapExtractPreRotationDimensions ( $rotation, $expected)
 provideBitmapExtractPreRotationDimensions More...
 
 testMetadata ( $name, $type, $info)
 provideFiles More...
 
 testMetadataAutoRotate ( $name, $type, $info)
 Same as before, but with auto-rotation set to auto. More...
 
 testMetadataAutoRotateUnsupported ( $name, $type, $info)
 Same as before, but with auto-rotation set to auto and an image scaler that doesn't support it. More...
 
 testMetadataNoAutoRotate ( $name, $type, $info)
 Same as before, but with auto-rotation disabled. More...
 
 testRotationRendering ( $name, $type, $info, $thumbs)
 provideFiles More...
 
 testRotationRenderingNoAutoRotate ( $name, $type, $info, $thumbs)
 provideFilesNoAutoRotate More...
 

Static Public Member Functions

static provideBitmapExtractPreRotationDimensions ()
 
static provideFiles ()
 
static provideFilesNoAutoRotate ()
 

Public Attributes

const TEST_HEIGHT = 200
 
const TEST_WIDTH = 100
 

Protected Member Functions

 createsThumbnails ()
 Mark this test as creating thumbnail files. More...
 
 setUp ()
 
- Protected Member Functions inherited from MediaWikiMediaTestCase
 createsThumbnails ()
 Will the test create thumbnails (and thus do we need to set aside a temporary directory for them?) More...
 
 dataFile ( $name, $type=false)
 Utility function: Get a new file object for a file on disk but not actually in db. More...
 
 getFilePath ()
 The result of this method will set the file path to use, as well as the protected member $filePath. More...
 
 getRepoOptions ()
 
 setUp ()
 

Private Attributes

BitmapHandler $handler
 

Additional Inherited Members

- Protected Attributes inherited from MediaWikiMediaTestCase
FSFileBackend $backend
 
string $filePath
 
FileRepo $repo
 

Detailed Description

Tests related to auto rotation.

Media medium

BitmapHandler

Definition at line 10 of file ExifRotationTest.php.

Member Function Documentation

◆ createsThumbnails()

ExifRotationTest::createsThumbnails ( )
protected

Mark this test as creating thumbnail files.

Definition at line 30 of file ExifRotationTest.php.

◆ provideBitmapExtractPreRotationDimensions()

static ExifRotationTest::provideBitmapExtractPreRotationDimensions ( )
static

Definition at line 268 of file ExifRotationTest.php.

◆ provideFiles()

static ExifRotationTest::provideFiles ( )
static

Definition at line 111 of file ExifRotationTest.php.

◆ provideFilesNoAutoRotate()

static ExifRotationTest::provideFilesNoAutoRotate ( )
static

Definition at line 221 of file ExifRotationTest.php.

◆ setUp()

ExifRotationTest::setUp ( )
protected

Definition at line 15 of file ExifRotationTest.php.

References handler.

◆ testBitmapExtractPreRotationDimensions()

ExifRotationTest::testBitmapExtractPreRotationDimensions (   $rotation,
  $expected 
)

provideBitmapExtractPreRotationDimensions

Definition at line 260 of file ExifRotationTest.php.

References handler.

◆ testMetadata()

ExifRotationTest::testMetadata (   $name,
  $type,
  $info 
)

provideFiles

Definition at line 37 of file ExifRotationTest.php.

References $file, $name, $type, MediaWikiMediaTestCase\dataFile(), and handler.

◆ testMetadataAutoRotate()

ExifRotationTest::testMetadataAutoRotate (   $name,
  $type,
  $info 
)

Same as before, but with auto-rotation set to auto.

This sets scaler to image magick, which we should detect as supporting rotation. provideFiles

Definition at line 53 of file ExifRotationTest.php.

References $file, $name, $type, MediaWikiMediaTestCase\dataFile(), and null.

◆ testMetadataAutoRotateUnsupported()

ExifRotationTest::testMetadataAutoRotateUnsupported (   $name,
  $type,
  $info 
)

Same as before, but with auto-rotation set to auto and an image scaler that doesn't support it.

provideFilesNoAutoRotate

Definition at line 160 of file ExifRotationTest.php.

References $file, $name, $type, MediaWikiMediaTestCase\dataFile(), and null.

◆ testMetadataNoAutoRotate()

ExifRotationTest::testMetadataNoAutoRotate (   $name,
  $type,
  $info 
)

Same as before, but with auto-rotation disabled.

provideFilesNoAutoRotate

Definition at line 148 of file ExifRotationTest.php.

References $file, $name, $type, and MediaWikiMediaTestCase\dataFile().

◆ testRotationRendering()

ExifRotationTest::testRotationRendering (   $name,
  $type,
  $info,
  $thumbs 
)

◆ testRotationRenderingNoAutoRotate()

ExifRotationTest::testRotationRenderingNoAutoRotate (   $name,
  $type,
  $info,
  $thumbs 
)

provideFilesNoAutoRotate

Definition at line 173 of file ExifRotationTest.php.

References $file, $matches, $name, $out, $params, $type, as, MediaWikiMediaTestCase\dataFile(), File\RENDER_FORCE, and File\RENDER_NOW.

Member Data Documentation

◆ $handler

BitmapHandler ExifRotationTest::$handler
private

Definition at line 13 of file ExifRotationTest.php.

◆ TEST_HEIGHT

const ExifRotationTest::TEST_HEIGHT = 200

Definition at line 255 of file ExifRotationTest.php.

◆ TEST_WIDTH

const ExifRotationTest::TEST_WIDTH = 100

Definition at line 254 of file ExifRotationTest.php.


The documentation for this class was generated from the following file: