Completed
Push — 1.x ( fbb429 )
by Jakub
06:33
created

createServiceCache__journal()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
// source: /home/jakub/mytester/tests/config.neon 
3
4
class Container_7a8261c63f extends Nette\DI\Container
0 ignored issues
show
Coding Style introduced by
Container_7a8261c63f does not seem to conform to the naming convention (^[A-Z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
5
{
6
	protected $meta = [
7
		'types' => [
8
			'Nette\Caching\Storages\IJournal' => [1 => ['cache.journal']],
9
			'Nette\Caching\IStorage' => [1 => ['cache.storage']],
10
			'Tracy\ILogger' => [1 => ['tracy.logger']],
11
			'Tracy\BlueScreen' => [1 => ['tracy.blueScreen']],
12
			'Tracy\Bar' => [1 => ['tracy.bar']],
13
			'MyTester\Bridges\NetteDI\TestsRunner' => [1 => ['mytester.runner']],
14
			'MyTester\TestCase' => [
15
				1 => [
16
					'mytester.test.1',
17
					'mytester.test.2',
18
					'mytester.test.3',
19
					'mytester.test.4',
20
				],
21
			],
22
			'MyTester\Tests\TestCaseTest' => [1 => ['mytester.test.1']],
23
			'MyTester\Tests\EnvironmentTest' => [1 => ['mytester.test.2']],
24
			'MyTester\Tests\JobTest' => [1 => ['mytester.test.3']],
25
			'MyTester\Tests\AssertTest' => [1 => ['mytester.test.4']],
26
			'Nette\DI\Container' => [1 => ['container']],
27
		],
28
		'services' => [
29
			'cache.journal' => 'Nette\Caching\Storages\IJournal',
30
			'cache.storage' => 'Nette\Caching\IStorage',
31
			'container' => 'Nette\DI\Container',
32
			'mytester.runner' => 'MyTester\Bridges\NetteDI\TestsRunner',
33
			'mytester.test.1' => 'MyTester\Tests\TestCaseTest',
34
			'mytester.test.2' => 'MyTester\Tests\EnvironmentTest',
35
			'mytester.test.3' => 'MyTester\Tests\JobTest',
36
			'mytester.test.4' => 'MyTester\Tests\AssertTest',
37
			'tracy.bar' => 'Tracy\Bar',
38
			'tracy.blueScreen' => 'Tracy\BlueScreen',
39
			'tracy.logger' => 'Tracy\ILogger',
40
		],
41
		'tags' => [
42
			'mytester.test' => [
43
				'mytester.test.1' => TRUE,
44
				'mytester.test.2' => TRUE,
45
				'mytester.test.3' => TRUE,
46
				'mytester.test.4' => TRUE,
47
			],
48
		],
49
		'aliases' => [
50
			'cacheStorage' => 'cache.storage',
51
			'nette.cacheJournal' => 'cache.journal',
52
		],
53
	];
54
55
56
	public function __construct()
57
	{
58
		parent::__construct([
59
			'appDir' => '/home/jakub/mytester/tests',
60
			'wwwDir' => '/home/jakub/mytester/tests',
61
			'debugMode' => FALSE,
62
			'productionMode' => TRUE,
63
			'consoleMode' => TRUE,
64
			'tempDir' => '/home/jakub/mytester/tests/temp',
65
		]);
66
	}
67
68
69
	/**
70
	 * @return Nette\Caching\Storages\IJournal
71
	 */
72
	public function createServiceCache__journal()
0 ignored issues
show
Coding Style introduced by
function createServiceCache__journal() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
73
	{
74
		$service = new Nette\Caching\Storages\SQLiteJournal('/home/jakub/mytester/tests/temp/cache/journal.s3db');
75
		return $service;
76
	}
77
78
79
	/**
80
	 * @return Nette\Caching\IStorage
81
	 */
82
	public function createServiceCache__storage()
0 ignored issues
show
Coding Style introduced by
function createServiceCache__storage() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
83
	{
84
		$service = new Nette\Caching\Storages\FileStorage('/home/jakub/mytester/tests/temp/cache',
85
			$this->getService('cache.journal'));
86
		return $service;
87
	}
88
89
90
	/**
91
	 * @return Nette\DI\Container
92
	 */
93
	public function createServiceContainer()
94
	{
95
		return $this;
96
	}
97
98
99
	/**
100
	 * @return MyTester\Bridges\NetteDI\TestsRunner
101
	 */
102
	public function createServiceMytester__runner()
0 ignored issues
show
Coding Style introduced by
function createServiceMytester__runner() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
103
	{
104
		$service = new MyTester\Bridges\NetteDI\TestsRunner;
105
		return $service;
106
	}
107
108
109
	/**
110
	 * @return MyTester\Tests\TestCaseTest
111
	 */
112
	public function createServiceMytester__test__1()
0 ignored issues
show
Coding Style introduced by
function createServiceMytester__test__1() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
113
	{
114
		$service = new MyTester\Tests\TestCaseTest;
115
		return $service;
116
	}
117
118
119
	/**
120
	 * @return MyTester\Tests\EnvironmentTest
121
	 */
122
	public function createServiceMytester__test__2()
0 ignored issues
show
Coding Style introduced by
function createServiceMytester__test__2() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
123
	{
124
		$service = new MyTester\Tests\EnvironmentTest;
125
		return $service;
126
	}
127
128
129
	/**
130
	 * @return MyTester\Tests\JobTest
131
	 */
132
	public function createServiceMytester__test__3()
0 ignored issues
show
Coding Style introduced by
function createServiceMytester__test__3() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
133
	{
134
		$service = new MyTester\Tests\JobTest;
135
		return $service;
136
	}
137
138
139
	/**
140
	 * @return MyTester\Tests\AssertTest
141
	 */
142
	public function createServiceMytester__test__4()
0 ignored issues
show
Coding Style introduced by
function createServiceMytester__test__4() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
143
	{
144
		$service = new MyTester\Tests\AssertTest;
145
		return $service;
146
	}
147
148
149
	/**
150
	 * @return Tracy\Bar
151
	 */
152
	public function createServiceTracy__bar()
0 ignored issues
show
Coding Style introduced by
function createServiceTracy__bar() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
153
	{
154
		$service = Tracy\Debugger::getBar();
155
		if (!$service instanceof Tracy\Bar) {
156
			throw new Nette\UnexpectedValueException('Unable to create service \'tracy.bar\', value returned by factory is not Tracy\Bar type.');
157
		}
158
		return $service;
159
	}
160
161
162
	/**
163
	 * @return Tracy\BlueScreen
164
	 */
165
	public function createServiceTracy__blueScreen()
0 ignored issues
show
Coding Style introduced by
function createServiceTracy__blueScreen() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
166
	{
167
		$service = Tracy\Debugger::getBlueScreen();
168
		if (!$service instanceof Tracy\BlueScreen) {
169
			throw new Nette\UnexpectedValueException('Unable to create service \'tracy.blueScreen\', value returned by factory is not Tracy\BlueScreen type.');
170
		}
171
		return $service;
172
	}
173
174
175
	/**
176
	 * @return Tracy\ILogger
177
	 */
178
	public function createServiceTracy__logger()
0 ignored issues
show
Coding Style introduced by
function createServiceTracy__logger() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
179
	{
180
		$service = Tracy\Debugger::getLogger();
181
		if (!$service instanceof Tracy\ILogger) {
182
			throw new Nette\UnexpectedValueException('Unable to create service \'tracy.logger\', value returned by factory is not Tracy\ILogger type.');
183
		}
184
		return $service;
185
	}
186
187
188
	public function initialize()
189
	{
190
		Tracy\Debugger::setLogger($this->getService('tracy.logger'));
191
		$runner = $this->getService('mytester.runner');
192
		spl_autoload_extensions(spl_autoload_extensions() . ",.phpt");
193
		MyTester\Bridges\NetteDI\TestsRunner::$autoloader = [
194
			[
195
				'MyTester\Tests\TestCaseTest',
196
				'/home/jakub/mytester/tests/../tests/TestCase.phpt',
197
			],
198
			[
199
				'MyTester\Tests\EnvironmentTest',
200
				'/home/jakub/mytester/tests/../tests/Environment.phpt',
201
			],
202
			[
203
				'MyTester\Tests\JobTest',
204
				'/home/jakub/mytester/tests/../tests/Job.phpt',
205
			],
206
			[
207
				'MyTester\Tests\AssertTest',
208
				'/home/jakub/mytester/tests/../tests/Assert.phpt',
209
			],
210
		];
211
		spl_autoload_register('MyTester\Bridges\NetteDI\TestsRunner::autoload');
212
		$runner->addSuit($this->getService('mytester.test.1'));
213
		$runner->addSuit($this->getService('mytester.test.2'));
214
		$runner->addSuit($this->getService('mytester.test.3'));
215
		$runner->addSuit($this->getService('mytester.test.4'));
216
		$runner->onExecute[] = ['MyTester\Environment', 'setup'];
217
		$runner->onExecute[] = ['MyTester\Environment', 'printInfo'];
218
	}
219
220
}
221