MediaWiki  master
GIFHandlerTest Class Reference

Media. More...

Inheritance diagram for GIFHandlerTest:
Collaboration diagram for GIFHandlerTest:

Public Member Functions

 provideGetLength ()
 
 testGetImageArea ( $filename, $expected)
 
 testGetIndependentMetaArray ( $filename, $expected)
 
 testGetLength ( $filename, $expectedLength)
 
 testGetMetadata ( $filename, $expected)
 
 testInvalidFile ()
 GIFHandler::getMetadata. More...
 
 testIsAnimanted ( $filename, $expected)
 
 testIsMetadataValid ( $metadata, $expected)
 

Static Public Member Functions

static provideGetImageArea ()
 
static provideGetIndependentMetaArray ()
 
static provideGetMetadata ()
 
static provideIsAnimated ()
 
static provideIsMetadataValid ()
 

Protected Member Functions

 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 ()
 

Protected Attributes

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

Detailed Description

Media.

Definition at line 6 of file GIFHandlerTest.php.

Member Function Documentation

◆ provideGetImageArea()

static GIFHandlerTest::provideGetImageArea ( )
static

Definition at line 56 of file GIFHandlerTest.php.

◆ provideGetIndependentMetaArray()

static GIFHandlerTest::provideGetIndependentMetaArray ( )
static

Definition at line 128 of file GIFHandlerTest.php.

◆ provideGetLength()

GIFHandlerTest::provideGetLength ( )

Definition at line 164 of file GIFHandlerTest.php.

◆ provideGetMetadata()

static GIFHandlerTest::provideGetMetadata ( )
static

Definition at line 101 of file GIFHandlerTest.php.

◆ provideIsAnimated()

static GIFHandlerTest::provideIsAnimated ( )
static

Definition at line 37 of file GIFHandlerTest.php.

References false, and true.

◆ provideIsMetadataValid()

static GIFHandlerTest::provideIsMetadataValid ( )
static

◆ setUp()

GIFHandlerTest::setUp ( )
protected

Definition at line 11 of file GIFHandlerTest.php.

References handler.

◆ testGetImageArea()

GIFHandlerTest::testGetImageArea (   $filename,
  $expected 
)
Parameters
string$filename
int$expectedTotal image area provideGetImageArea GIFHandler::getImageArea

Definition at line 50 of file GIFHandlerTest.php.

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

◆ testGetIndependentMetaArray()

GIFHandlerTest::testGetIndependentMetaArray (   $filename,
  $expected 
)
Parameters
string$filename
string$expectedSerialized array provideGetIndependentMetaArray GIFHandler::getCommonMetaArray

Definition at line 122 of file GIFHandlerTest.php.

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

◆ testGetLength()

GIFHandlerTest::testGetLength (   $filename,
  $expectedLength 
)
Parameters
string$filename
float$expectedLengthprovideGetLength GIFHandler::getLength

Definition at line 158 of file GIFHandlerTest.php.

References $file, and MediaWikiMediaTestCase\dataFile().

◆ testGetMetadata()

GIFHandlerTest::testGetMetadata (   $filename,
  $expected 
)
Parameters
string$filename
string$expectedSerialized array provideGetMetadata GIFHandler::getMetadata

Definition at line 95 of file GIFHandlerTest.php.

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

◆ testInvalidFile()

GIFHandlerTest::testInvalidFile ( )

GIFHandler::getMetadata.

Definition at line 20 of file GIFHandlerTest.php.

References $res, GIFHandler\BROKEN_FILE, handler, and null.

◆ testIsAnimanted()

GIFHandlerTest::testIsAnimanted (   $filename,
  $expected 
)
Parameters
string$filenameBasename of the file to check
bool$expectedExpected result. provideIsAnimated GIFHandler::isAnimatedImage

Definition at line 31 of file GIFHandlerTest.php.

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

◆ testIsMetadataValid()

GIFHandlerTest::testIsMetadataValid (   $metadata,
  $expected 
)
Parameters
string$metadataSerialized metadata
int$expectedOne of the class constants of GIFHandler provideIsMetadataValid GIFHandler::isMetadataValid

Definition at line 69 of file GIFHandlerTest.php.

References handler, and null.

Member Data Documentation

◆ $handler

GIFHandler GIFHandlerTest::$handler
protected

Definition at line 9 of file GIFHandlerTest.php.


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