Completed
Push — master ( 4541dc...a88653 )
by Aimeos
01:26
created
lib/custom/tests/TestHelper.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 	 * Creates a new context item.
51 51
 	 *
52 52
 	 * @param string $site Unique site code
53
-	 * @return \\Aimeos\MShop\Context\Item\Iface Context object
53
+	 * @return Aimeos\MShop\Context\Item\Standard Context object
54 54
 	 */
55 55
 		private static function createContext( $site )
56 56
 	{
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@  discard block
 block discarded – undo
17 17
 
18 18
 		$includepaths = $mshop->getIncludePaths();
19 19
 		$includepaths[] = get_include_path();
20
-		set_include_path( implode( PATH_SEPARATOR, $includepaths ) );
20
+		set_include_path(implode(PATH_SEPARATOR, $includepaths));
21 21
 	}
22 22
 
23 23
 
24
-	public static function getContext( $site = 'unittest' )
24
+	public static function getContext($site = 'unittest')
25 25
 	{
26
-		if( !isset( self::$context[$site] ) ) {
27
-			self::$context[$site] = self::createContext( $site );
26
+		if (!isset(self::$context[$site])) {
27
+			self::$context[$site] = self::createContext($site);
28 28
 		}
29 29
 
30 30
 		return clone self::$context[$site];
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
 
34 34
 	private static function getAimeos()
35 35
 	{
36
-		if( !isset( self::$aimeos ) )
36
+		if (!isset(self::$aimeos))
37 37
 		{
38 38
 			require_once 'Bootstrap.php';
39
-			spl_autoload_register( 'Aimeos\\Bootstrap::autoload' );
39
+			spl_autoload_register('Aimeos\\Bootstrap::autoload');
40 40
 
41
-			$extdir = dirname( dirname( dirname( __DIR__ ) ) );
42
-			self::$aimeos = new \Aimeos\Bootstrap( array( $extdir ), false );
41
+			$extdir = dirname(dirname(dirname(__DIR__)));
42
+			self::$aimeos = new \Aimeos\Bootstrap(array($extdir), false);
43 43
 		}
44 44
 
45 45
 		return self::$aimeos;
@@ -52,37 +52,37 @@  discard block
 block discarded – undo
52 52
 	 * @param string $site Unique site code
53 53
 	 * @return \\Aimeos\MShop\Context\Item\Iface Context object
54 54
 	 */
55
-		private static function createContext( $site )
55
+		private static function createContext($site)
56 56
 	{
57 57
 		$ctx = new \Aimeos\MShop\Context\Item\Standard();
58 58
 		$mshop = self::getAimeos();
59 59
 
60 60
 
61
-		$paths = $mshop->getConfigPaths( 'mysql' );
62
-		$paths[] = __DIR__ . DIRECTORY_SEPARATOR . 'config';
61
+		$paths = $mshop->getConfigPaths('mysql');
62
+		$paths[] = __DIR__.DIRECTORY_SEPARATOR.'config';
63 63
 
64
-		$conf = new \Aimeos\MW\Config\PHPArray( [], $paths );
65
-		$ctx->setConfig( $conf );
64
+		$conf = new \Aimeos\MW\Config\PHPArray([], $paths);
65
+		$ctx->setConfig($conf);
66 66
 
67 67
 
68
-		$dbm = new \Aimeos\MW\DB\Manager\PDO( $conf );
69
-		$ctx->setDatabaseManager( $dbm );
68
+		$dbm = new \Aimeos\MW\DB\Manager\PDO($conf);
69
+		$ctx->setDatabaseManager($dbm);
70 70
 
71 71
 
72
-		$logger = new \Aimeos\MW\Logger\File( $site . '.log', \Aimeos\MW\Logger\Base::DEBUG );
73
-		$ctx->setLogger( $logger );
72
+		$logger = new \Aimeos\MW\Logger\File($site.'.log', \Aimeos\MW\Logger\Base::DEBUG);
73
+		$ctx->setLogger($logger);
74 74
 
75 75
 
76 76
 		$session = new \Aimeos\MW\Session\None();
77
-		$ctx->setSession( $session );
77
+		$ctx->setSession($session);
78 78
 
79 79
 
80
-		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::create( $ctx );
81
-		$localeItem = $localeManager->bootstrap( $site, '', '', false );
80
+		$localeManager = \Aimeos\MShop\Locale\Manager\Factory::create($ctx);
81
+		$localeItem = $localeManager->bootstrap($site, '', '', false);
82 82
 
83
-		$ctx->setLocale( $localeItem );
83
+		$ctx->setLocale($localeItem);
84 84
 
85
-		$ctx->setEditor( 'ai-symfony:unittest' );
85
+		$ctx->setEditor('ai-symfony:unittest');
86 86
 
87 87
 		return $ctx;
88 88
 	}
Please login to merge, or discard this patch.