Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ObjectManagerFactoryTest.php
Go to the documentation of this file.
1 <?php
7 
9 
13 class ObjectManagerFactoryTest extends \PHPUnit\Framework\TestCase
14 {
16  protected static $originalAutoloadFunctions;
17 
19  protected static $originalIncludePath;
20 
21  public static function setUpBeforeClass()
22  {
23  self::$originalAutoloadFunctions = spl_autoload_functions();
24  self::$originalIncludePath = get_include_path();
25  }
26 
30  public static function tearDownAfterClass()
31  {
32  foreach (spl_autoload_functions() as $autoloadFunction) {
33  spl_autoload_unregister($autoloadFunction);
34  }
35  foreach (self::$originalAutoloadFunctions as $autoloadFunction) {
36  spl_autoload_register($autoloadFunction);
37  }
38  set_include_path(self::$originalIncludePath);
40  }
41 
47  {
48  $rootPath = __DIR__ . '/_files/';
50  $factory->create([], false);
51  }
52 }
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60
static createObjectManagerFactory($rootDir, array $initParams)
Definition: Bootstrap.php:149
static rmdirRecursive($dir, $recursive=true)
Definition: File.php:335