~ubuntu-branches/ubuntu/trusty/mediawiki/trusty

« back to all changes in this revision

Viewing changes to tests/phpunit/includes/filerepo/FileRepoTest.php

  • Committer: Package Import Robot
  • Author(s): Thorsten Glaser
  • Date: 2014-03-28 09:56:29 UTC
  • mfrom: (1.3.14)
  • Revision ID: package-import@ubuntu.com-20140328095629-1526y9tchdd507id
Tags: 1:1.19.14+dfsg-1
* New upstream security fix release (Closes: #742857):
  - (bug 62497) SECURITY: Add CSRF token on Special:ChangePassword
  - (bug 62467) Set a title for the context during import on the cli
* Use upstream-provided signing key bundle

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
class FileRepoTest extends MediaWikiTestCase {
 
4
 
 
5
        /**
 
6
         * @expectedException MWException
 
7
         */
 
8
        function testFileRepoConstructionOptionCanNotBeNull() {
 
9
                $f = new FileRepo();
 
10
        }
 
11
        /**
 
12
         * @expectedException MWException
 
13
         */
 
14
        function testFileRepoConstructionOptionCanNotBeAnEmptyArray() {
 
15
                $f = new FileRepo( array() );
 
16
        }
 
17
        /**
 
18
         * @expectedException MWException
 
19
         */
 
20
        function testFileRepoConstructionOptionNeedNameKey() {
 
21
                $f = new FileRepo( array(
 
22
                        'backend' => 'foobar'
 
23
                ) );
 
24
        }
 
25
        /**
 
26
         * @expectedException MWException
 
27
         */
 
28
        function testFileRepoConstructionOptionNeedBackendKey() {
 
29
                $f = new FileRepo( array(
 
30
                        'name' => 'foobar'
 
31
                ) );
 
32
        }
 
33
 
 
34
        function testFileRepoConstructionWithRequiredOptions() {
 
35
                $f = new FileRepo( array(
 
36
                        'name'    => 'FileRepoTestRepository',
 
37
                        'backend' => 'local-backend',
 
38
                ));
 
39
                $this->assertInstanceOf( 'FileRepo', $f );
 
40
        }
 
41
}