MediaWiki  master
PNGHandlerTest Class Reference

Media. More...

Inheritance diagram for PNGHandlerTest:
Collaboration diagram for PNGHandlerTest:

Public Member Functions

 provideGetLength ()
 
 testGetImageArea ( $filename, $expected)
 
 testGetIndependentMetaArray ( $filename, $expected)
 
 testGetLength ( $filename, $expectedLength)
 
 testGetMetadata ( $filename, $expected)
 
 testInvalidFile ()
 PNGHandler::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

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

Detailed Description

Media.

Definition at line 6 of file PNGHandlerTest.php.

Member Function Documentation

◆ provideGetImageArea()

static PNGHandlerTest::provideGetImageArea ( )
static

Definition at line 55 of file PNGHandlerTest.php.

◆ provideGetIndependentMetaArray()

static PNGHandlerTest::provideGetIndependentMetaArray ( )
static

Definition at line 130 of file PNGHandlerTest.php.

◆ provideGetLength()

PNGHandlerTest::provideGetLength ( )

Definition at line 153 of file PNGHandlerTest.php.

◆ provideGetMetadata()

static PNGHandlerTest::provideGetMetadata ( )
static

Definition at line 103 of file PNGHandlerTest.php.

◆ provideIsAnimated()

static PNGHandlerTest::provideIsAnimated ( )
static

Definition at line 36 of file PNGHandlerTest.php.

References false, and true.

◆ provideIsMetadataValid()

static PNGHandlerTest::provideIsMetadataValid ( )
static

◆ setUp()

PNGHandlerTest::setUp ( )
protected

Definition at line 11 of file PNGHandlerTest.php.

References handler.

◆ testGetImageArea()

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

Definition at line 49 of file PNGHandlerTest.php.

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

◆ testGetIndependentMetaArray()

PNGHandlerTest::testGetIndependentMetaArray (   $filename,
  $expected 
)
Parameters
string$filename
array$expectedExpected standard metadata provideGetIndependentMetaArray PNGHandler::getCommonMetaArray

Definition at line 124 of file PNGHandlerTest.php.

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

◆ testGetLength()

PNGHandlerTest::testGetLength (   $filename,
  $expectedLength 
)
Parameters
string$filename
float$expectedLengthprovideGetLength PNGHandler::getLength

Definition at line 147 of file PNGHandlerTest.php.

References $file, and MediaWikiMediaTestCase\dataFile().

◆ testGetMetadata()

PNGHandlerTest::testGetMetadata (   $filename,
  $expected 
)
Parameters
string$filename
string$expectedSerialized array provideGetMetadata PNGHandler::getMetadata

Definition at line 96 of file PNGHandlerTest.php.

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

◆ testInvalidFile()

PNGHandlerTest::testInvalidFile ( )

PNGHandler::getMetadata.

Definition at line 19 of file PNGHandlerTest.php.

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

◆ testIsAnimanted()

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

Definition at line 30 of file PNGHandlerTest.php.

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

◆ testIsMetadataValid()

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

Definition at line 70 of file PNGHandlerTest.php.

References handler, and null.

Member Data Documentation

◆ $handler

PNGHandler PNGHandlerTest::$handler
protected

Definition at line 9 of file PNGHandlerTest.php.


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