BaseTestCase.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2020 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
11 namespace wcmf\test\lib;
12 
14 
15 /**
16  * BaseTestCase is the base class for all wCMF test cases.
17  *
18  * @author ingo herwig <ingo@wemove.com>
19  */
20 abstract class BaseTestCase extends \PHPUnit_Framework_TestCase {
21  use TestTrait;
22 
23  public function run(\PHPUnit_Framework_TestResult $result=null) {
24  $this->setPreserveGlobalState(false);
25  return parent::run($result);
26  }
27 
28  protected function setUp() {
29  TestUtil::initFramework(WCMF_BASE.'app/config/');
30  parent::setUp();
31  $this->getLogger(__CLASS__)->info("Running: ".get_class($this).".".$this->getName());
32  }
33 }
34 ?>
run(\PHPUnit_Framework_TestResult $result=null)
Test support classes.
Definition: namespaces.php:100
BaseTestCase is the base class for all wCMF test cases.
static initFramework($configPath)
Set up the wcmf framework.
Definition: TestUtil.php:35
TestUtil provides helper methods for testing wCMF functionality.
Definition: TestUtil.php:25