~ubuntu-branches/ubuntu/utopic/moodle/utopic

« back to all changes in this revision

Viewing changes to lib/tests/environment_test.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (36.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140512161038-puyqf65k4e0s8ytz
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
/**
30
30
 * Do standard environment.xml tests.
31
31
 */
32
 
class environment_testcase extends advanced_testcase {
 
32
class core_environment_testcase extends advanced_testcase {
33
33
 
 
34
    /**
 
35
     * Test the environment.
 
36
     */
34
37
    public function test_environment() {
35
38
        global $CFG;
36
39
 
39
42
 
40
43
        $this->assertNotEmpty($envstatus);
41
44
        foreach ($environment_results as $environment_result) {
 
45
            if ($environment_result->part === 'php_setting'
 
46
                and $environment_result->info === 'opcache.enable'
 
47
                and $environment_result->getLevel() === 'optional'
 
48
                and $environment_result->getStatus() === false
 
49
            ) {
 
50
                $this->markTestSkipped('OPCache extension is not necessary for unit testing.');
 
51
                continue;
 
52
            }
42
53
            $this->assertTrue($environment_result->getStatus(), "Problem detected in environment ($environment_result->part:$environment_result->info), fix all warnings and errors!");
43
54
        }
44
55
    }