tests: mock parser tests file access
authorAntoine Musso <hashar@free.fr>
Sun, 28 Apr 2013 21:13:49 +0000 (23:13 +0200)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 10 May 2013 17:16:55 +0000 (10:16 -0700)
commitdfaf583d83d513631c7006659be0ab252a8c7c7d
tree0918c335f91da4adac5417fa9271d6d94871a73b
parentc5dcb50a5765b00eb277bf1890feb044e89fb133
tests: mock parser tests file access

I eventually got tired of our parser tests creating and deleting fixture
files over and over.  This patch mock the files in memory and just
expose the file metadata which is all we need for parser tests.

The mocked classes are under /tests/phpunit/mocks/ and respect the
hierarchy of /includes/.

The wiki.png and headbg.jpg files are still copied on each test :/

Change-Id: Iccdff67222e66d48d01dd1596d09df2ea24b8c2a
tests/TestsAutoLoader.php
tests/phpunit/includes/parser/NewParserTest.php
tests/phpunit/mocks/filebackend/MockFSFile.php [new file with mode: 0644]
tests/phpunit/mocks/filebackend/MockFileBackend.php [new file with mode: 0644]
tests/phpunit/mocks/media/MockBitmapHandler.php [new file with mode: 0644]