Sprint-0 » F3_robert-1221493612.diff

Robert Lemke, 2008-09-15 17:46

View differences:

Packages/FLOW3/Resources/Fixtures/Package.xml (revision 0)
1
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://typo3.org/ns/2008/flow3/package" version="1.0">
3
   <key>YetAnotherTestPackage</key>
4
   <title>Yet another test package</title>
5
   <description>A test package to test the creation of the Package.xml by the Package Manager</description>
6
   <version>0.1.1</version>
7
   <state>Beta</state>
8
   <categories>
9
      <category>Testing</category>
10
      <category>System</category>
11
   </categories>
12
   <parties>
13
      <person role="LeadDeveloper">
14
         <name>Robert Lemke</name>
15
         <email>robert@typo3.org</email>
16
         <website>http://www.flow3.org</website>
17
         <company>TYPO3 Association</company>
18
         <repositoryUserName>robert</repositoryUserName>
19
      </person>
20
      <company>
21
         <name>Acme Inc.</name>
22
         <email>info@acme.com</email>
23
         <website>http://www.acme.com</website>
24
      </company>
25
   </parties>
26
   <constraints>
27
      <depends>
28
         <package minVersion="1.0.0" maxVersion="1.9.9">FLOW3</package>
29
      </depends>
30
      <suggests>
31
         <system type="Memory">16M</system>
32
      </suggests>
33
   </constraints>
34
</package>
Packages/FLOW3/Classes/Controller/F3_FLOW3_Controller_Cache.php (revision 0)
1
<?php
2
declare(ENCODING = 'utf-8');
3

  
4
/*                                                                        *
5
 * This script is part of the TYPO3 project - inspiring people to share!  *
6
 *                                                                        *
7
 * TYPO3 is free software; you can redistribute it and/or modify it under *
8
 * the terms of the GNU General Public License version 2 as published by  *
9
 * the Free Software Foundation.                                          *
10
 *                                                                        *
11
 * This script is distributed in the hope that it will be useful, but     *
12
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
13
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
14
 * Public License for more details.                                       *
15
 *                                                                        */
16

  
17
/**
18
 * @package FLOW3
19
 * @subpackage MVC
20
 * @version $Id$
21
 */
22

  
23
/**
24
 * Package controller to handle cache from CLI (flush)
25
 *
26
 * @package FLOW3
27
 * @subpackage MVC
28
 * @version $Id$
29
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
30
 */
31
class F3_FLOW3_Controller_Cache extends F3_FLOW3_MVC_Controller_ActionController {
32

  
33
	/**
34
	 * @var F3_FLOW3_Cache_Manager
35
	 */
36
	protected $cacheManager;
37
	
38
	/**
39
	 * @var array
40
	 */
41
	protected $supportedRequestTypes = array('F3_FLOW3_MVC_CLI_Request');
42

  
43
	
44
	
45
	/**
46
	 * Injects the cache manager
47
	 *
48
	 * @param F3_FLOW3_Cache_Manager $cacheManager
49
	 * @return void
50
	 * @author Tobias Liebig <mail_typo3@etobi.de>
51
	 */
52
	public function injectCacheManager(F3_FLOW3_Cache_Manager $cacheManager) {
53
		$this->cacheManager = $cacheManager;
54
	}
55
	
56
	
57
	/**
58
	 * create the package 
59
	 * 
60
	 * @return void
61
	 * @author Tobias Liebig <mail_typo3@etobi.de>
62
	 */
63
	public function flushAction() {
64
		$this->cacheManager->flushCaches();
65
		return 'all caches flushed.' . chr(10);
66
	}
67
}
68

  
69
?>\ No newline at end of file
Packages/FLOW3/Classes/Controller/F3_FLOW3_Controller_Package.php (revision 0)
1
<?php
2
declare(ENCODING = 'utf-8');
3

  
4
/*                                                                        *
5
 * This script is part of the TYPO3 project - inspiring people to share!  *
6
 *                                                                        *
7
 * TYPO3 is free software; you can redistribute it and/or modify it under *
8
 * the terms of the GNU General Public License version 2 as published by  *
9
 * the Free Software Foundation.                                          *
10
 *                                                                        *
11
 * This script is distributed in the hope that it will be useful, but     *
12
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
13
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
14
 * Public License for more details.                                       *
15
 *                                                                        */
16

  
17
/**
18
 * @package FLOW3
19
 * @subpackage MVC
20
 * @version $Id$
21
 */
22

  
23
/**
24
 * Package controller to handle packages from CLI (create/activate/deactivate packages)
25
 *
26
 * @package FLOW3
27
 * @subpackage MVC
28
 * @version $Id$
29
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
30
 */
31
class F3_FLOW3_Controller_Package extends F3_FLOW3_MVC_Controller_ActionController {
32

  
33
	/**
34
	 * @var F3_FLOW3_Package_ManagerInterface
35
	 */
36
	protected $packageManager;
37
	
38
	/**
39
	 * @var array
40
	 */
41
	protected $supportedRequestTypes = array('F3_FLOW3_MVC_CLI_Request');
42

  
43
	
44
	/**
45
	 * Initializes this controller
46
	 *
47
	 * @return void
48
	 * @author Tobias Liebig <mail_typo3@etobi.de>
49
	 */
50
	public function initializeController() {
51
		$this->arguments->addNewArgument('packageKey');
52
	}
53
	
54
	
55
	/**
56
	 * Injects the package manager
57
	 *
58
	 * @param F3_FLOW3_Package_ManagerInterface $packageManager
59
	 * @return void
60
	 * @author Tobias Liebig <mail_typo3@etobi.de>
61
	 */
62
	public function injectPackageManager(F3_FLOW3_Package_ManagerInterface $packageManager) {
63
		$this->packageManager = $packageManager;
64
	}
65

  
66
	
67
	/**
68
	 * default action (no arguments given)
69
	 * @return void
70
	 * @author Tobias Liebig <mail_typo3@etobi.de>
71
	 */
72
	public function defaultAction() {
73
		return $this->helpAction();
74
	}
75
	
76
	
77
	/**
78
	 * create the package 
79
	 * 
80
	 * @return void
81
	 * @author Tobias Liebig <mail_typo3@etobi.de>
82
	 */
83
	public function createAction() {
84
		if ($this->arguments['packageKey'] == '') {
85
			return $this->helpAction();
86
		} else {
87
			$this->packageManager->createPackage($this->arguments['packageKey']->getValue());
88
			return 'new package "' . $this->arguments['packageKey'] . '" created.' . chr(10);
89
		}
90
	}
91
	
92

  
93
	/**
94
	 * activate the package
95
	 * 
96
	 * @return void
97
	 * @author Tobias Liebig <mail_typo3@etobi.de>
98
	 */
99
	public function activateAction() {
100
		if ($this->arguments['packageKey'] == '') {
101
			return $this->helpAction();
102
		} else {
103
			$this->packageManager->activatePackage($this->arguments['packageKey']->getValue());
104
			return 'package "' . $this->arguments['packageKey'] . '" activated.' . chr(10);
105
		}
106
	}
107
	
108

  
109
	/**
110
	 * deactivate the package
111
	 * 
112
	 * @return void
113
	 * @author Tobias Liebig <mail_typo3@etobi.de>
114
	 */
115
	public function deactivateAction() {
116
		if ($this->arguments['packageKey'] == '') {
117
			return $this->helpAction();
118
		} else {
119
			$this->packageManager->deactivatePackage($this->arguments['packageKey']->getValue());
120
			return 'package "' . $this->arguments['packageKey'] . '" deactivated.' . chr(10);
121
		}
122
	}
123
	
124
	
125
	/**
126
	 * displays a help screen
127
	 *
128
	 * @return void
129
	 * @author Tobias Liebig <mail_typo3@etobi.de>
130
	 */
131
	public function helpAction() {
132
		return chr(10) .
133
			'FLOW3 Package CLI Controller' . chr(10) .
134
			'Usage: php index_dev.php FLOW3 Package <command> package-key=<PACKAGE>' . chr(10).
135
			chr(10) .
136
			'<command>:' . chr(10) .
137
			'  create     - create a new package' . chr(10).
138
			'  activate   - activate a package' . chr(10).
139
			'  deactivate - activate a package' . chr(10)
140
		;
141
	}
142
}
143

  
144
?>\ No newline at end of file
Packages/FLOW3/Classes/Package/Exception/F3_FLOW3_Package_Exception_PackageKeyAlreadyExists.php (revision 0)
1
<?php
2
declare(ENCODING = 'utf-8');
3
namespace F3::FLOW3::Package::Exception;
4

  
5
/*                                                                        *
6
 * This script is part of the TYPO3 project - inspiring people to share!  *
7
 *                                                                        *
8
 * TYPO3 is free software; you can redistribute it and/or modify it under *
9
 * the terms of the GNU General Public License version 2 as published by  *
10
 * the Free Software Foundation.                                          *
11
 *                                                                        *
12
 * This script is distributed in the hope that it will be useful, but     *
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
14
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
15
 * Public License for more details.                                       *
16
 *                                                                        */
17

  
18
/**
19
 * @package FLOW3
20
 * @subpackage Package
21
 * @version $Id$
22
 */
23

  
24
/**
25
 * A "Package Key Already Exists" exception
26
 *
27
 * @package FLOW3
28
 * @subpackage Package
29
 * @version $Id$
30
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
31
 */
32
class PackageKeyAlreadyExists extends F3::FLOW3::Package::Exception {
33

  
34
}
35

  
36
?>
Packages/FLOW3/Classes/Package/Exception/F3_FLOW3_Package_Exception_ProtectedPackageKey.php (revision 0)
1
<?php
2
declare(ENCODING = 'utf-8');
3
namespace F3::FLOW3::Package::Exception;
4

  
5
/*                                                                        *
6
 * This script is part of the TYPO3 project - inspiring people to share!  *
7
 *                                                                        *
8
 * TYPO3 is free software; you can redistribute it and/or modify it under *
9
 * the terms of the GNU General Public License version 2 as published by  *
10
 * the Free Software Foundation.                                          *
11
 *                                                                        *
12
 * This script is distributed in the hope that it will be useful, but     *
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
14
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
15
 * Public License for more details.                                       *
16
 *                                                                        */
17

  
18
/**
19
 * @package FLOW3
20
 * @subpackage Package
21
 * @version $Id$
22
 */
23

  
24
/**
25
 * A "Protected Package Key" exception
26
 *
27
 * @package FLOW3
28
 * @subpackage Package
29
 * @version $Id$
30
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
31
 */
32
class ProtectedPackageKey extends F3::FLOW3::Package::Exception {
33

  
34
}
35

  
36
?>
Packages/FLOW3/Classes/Package/F3_FLOW3_Package_Meta.php (working copy)
31 31
 */
32 32
class Meta implements F3::FLOW3::Package::MetaInterface {
33 33

  
34
	const STATE_DEVELOPMENT = 'Development';
35
	const STATE_ALPHA = 'Alpha';
36
	const STATE_BETA = 'Beta';
37
	const STATE_RELEASECANDIDATE = 'ReleaseCandidate';
38
	const STATE_FINAL = 'Final';
39
	const STATE_OBSOLETE = 'Obsolete';
40

  
34 41
	/**
35
	 * @var	string The package key
42
	 * @var string
36 43
	 */
37 44
	protected $packageKey;
38 45

  
......
37 44
	protected $packageKey;
38 45

  
39 46
	/**
40
	 * @var	F3::FLOW3::Package::Version	The version number
47
	 * @var string
41 48
	 */
42 49
	protected $version;
43 50

  
......
42 49
	protected $version;
43 50

  
44 51
	/**
45
	 * @var string	Package title
52
	 * @var string
46 53
	 */
47 54
	protected $title;
48 55

  
......
47 54
	protected $title;
48 55

  
49 56
	/**
50
	 * Constructor
57
	 * @var string
58
	 */
59
	protected $description;
60

  
61
	/**
62
	 * @var string
63
	 */
64
	protected $state;
65

  
66
	/**
67
	 * The package categories
68
	 *
69
	 * @var array
70
	 */
71
	protected $categories = array();
72

  
73
	/**
74
	 * Array of F3::FLOW3::Package::Meta::Party Package parties (person, company)
75
	 *
76
	 * @var array
77
	 */
78
	protected $parties = array();
79

  
80
	/**
81
	 * Array of Array of F3::FLOW3::Package::Meta::Constraint: Package constraints by constraint type (depends, conflicts, suggests)
82
	 *
83
	 * @var array
84
	 */
85
	protected $constraints = array();
86

  
87
	/**
88
	 * @var array
89
	 */
90
	protected $constraintTypes = array('depends', 'conflicts', 'suggests');
91

  
92
	/**
93
	 * Package meta data constructor
94
	 *
95
	 * @param string $packageKey The package key
96
	 * @author Robert Lemke <robert@typo3.org>
97
	 * @author Christopher Hlubek <hlubek@networkteam.com>
98
	 */
99
	public function __construct($packageKey) {
100
		$this->packageKey = $packageKey;
101
	}
102

  
103
	/**
104
	 * Set meta information from the package XML
105
	 *
106
	 * @param SimpleXMLElement $packageMetaXML The package Meta XML
107
	 * @return void
108
	 * @author Robert Lemke <robert@typo3.org>
109
	 * @author Christopher Hlubek <hlubek@networkteam.com>
110
	 * @todo Validate the $packageMetaXML against RelaxNG schema
111
	 * @todo Nested too deep, refactor
112
	 */
113
	public function setMetaFromXML(SimpleXMLElement $packageMetaXML) {
114
		$this->version = (string)$packageMetaXML->version;
115
		$this->title = (string)$packageMetaXML->title;
116
		$this->description = (string)$packageMetaXML->description;
117
		$this->state = (string)$packageMetaXML->state;
118
		$this->categories = array();
119

  
120
		if ($packageMetaXML->categories) {
121
			foreach($packageMetaXML->categories->category as $category) {
122
				$this->categories[] = (string)$category;
123
			}
124
		}
125
		$this->parties = array();
126
		if (key_exists('parties', $packageMetaXML->parties) && count($packageMetaXML->parties) > 0) {
127
			foreach($packageMetaXML->parties->person as $person) {
128
				$role = (string)$person['role'];
129
				$this->parties[] = new F3::FLOW3::Package::Meta::Person($role,
130
					(string)$person->name, (string)$person->email, (string)$person->website,
131
					(string)$person->company, (string)$person->repositoryUserName);
132
			}
133
			foreach($packageMetaXML->parties->company as $company) {
134
				$role = (string)$company['role'];
135
				$this->parties[] = new F3::FLOW3::Package::Meta::Company($role,
136
					(string)$company->name, (string)$company->email, (string)$company->website);
137
			}
138
		}
139
		foreach ($this->constraintTypes as $constraintType) {
140
			if ($packageMetaXML->constraints->{$constraintType}) {
141
				foreach ($packageMetaXML->constraints->{$constraintType}->children() as $constraint) {
142
					switch ((string)$constraint->getName()) {
143
						case 'package':
144
							$this->constraints[$constraintType][] = new F3::FLOW3::Package::Meta::PackageConstraint(
145
								$constraintType, (string)$constraint, (string)$constraint['minVersion'],
146
								(string)$constraint['maxVersion']);
147
							break;
148
						case 'system':
149
							$this->constraints[$constraintType][] = new F3::FLOW3::Package::Meta::SystemConstraint(
150
								$constraintType, (string)$constraint['type'], (string)$constraint,
151
								(string)$constraint['minVersion'], (string)$constraint['maxVersion']);
152
							break;
153
					}
154
				}
155
			}
156
		}
157
	}
158

  
159
	/**
160
	 * Return package meta as XML string
51 161
	 *
52
	 * @param	string				The package key
53
	 * @param   [SimpleXMLElement]	If specified, the XML data (which must be valid package meta XML) will be used to set the meta properties
54
	 * @return  void
55
	 * @author  Robert Lemke <robert@typo3.org>
56
	 * @todo    Validate the $packageMetaXML as soon as we have a DTD / Schema for it
162
	 * @return string The package meta in XML
163
	 * @author Christopher Hlubek <hlubek@networkteam.com>
57 164
	 */
58
	public function __construct($packageKey, SimpleXMLElement $packageMetaXML = NULL) {
59
		if ($packageMetaXML !== NULL) {
60
			$this->packageKey = (string)$packageMetaXML->packageKey;
61
			$this->version = (string)$packageMetaXML->version;
62
			$this->title = (string)$packageMetaXML->title;
165
	public function getPackageXML() {
166
		$xml = new XMLWriter();
167
		$xml->openMemory();
168
		$xml->setIndent(true);
169
		$xml->setIndentString(chr(9));
170

  
171
		$xml->writeRaw('<?xml version="1.0" encoding="utf-8" standalone="yes" ?>' . chr(10));
172
		$xml->startElement('package');
173

  
174
		$xml->writeAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
175
		$xml->writeAttribute('xmlns', 'http://typo3.org/ns/2008/flow3/package');
176
		$xml->writeAttribute('version', '1.0');
177

  
178
		$xml->writeElement('key', $this->packageKey);
179
		$xml->writeElement('title', $this->title);
180
		$xml->writeElement('description', $this->description);
181
		$xml->writeElement('version', $this->version);
182
		$xml->writeElement('state', $this->state);
183

  
184
		if ($this->categories) {
185
			$xml->startElement('categories');
186
			foreach ($this->categories as $category) {
187
				$xml->writeElement('category', $category);
188
			}
189
			$xml->endElement();
190
		}
191

  
192
		if ($this->parties) {
193
			$xml->startElement('parties');
194
			foreach($this->parties as $party) {
195
				$party->writeXML($xml);
196
			}
197
			$xml->endElement();
63 198
		}
199

  
200
		$xml->startElement('constraints');
201
		foreach ($this->constraintTypes as $constraintType) {
202
			$constraints = $this->getConstraints($constraintType);
203
			if (count($constraints)) {
204
				$xml->startElement($constraintType);
205
				foreach ($constraints as $constraint) {
206
					$constraint->writeXML($xml);
207
				}
208
				$xml->endElement();
209
			}
210
		}
211
		$xml->endElement();
212
		$xml->endElement();
213

  
214
		return $xml->outputMemory();
64 215
	}
65 216

  
217
	/**
218
	 * Returns the package key
219
	 *
220
	 * @return string The package key
221
	 * @author  Christopher Hlubek <hlubek@networkteam.com>
222
	 */
223
	public function getPackageKey() {
224
		return $this->packageKey;
225
	}
66 226

  
67
}
227
	/**
228
	 * Returns the package title
229
	 *
230
	 * @return string The package title
231
	 * @author  Christopher Hlubek <hlubek@networkteam.com>
232
	 */
233
	public function getTitle() {
234
		return $this->title;
235
	}
236

  
237
	/**
238
	 * Sets the package title
239
	 *
240
	 * @param string $title The package title
241
	 * @author Christopher Hlubek <hlubek@networkteam.com>
242
	 */
243
	public function setTitle($title) {
244
		$this->title = $title;
245
	}
246

  
247
	/**
248
	 * Returns the package version
249
	 *
250
	 * @return string The package version
251
	 * @author  Christopher Hlubek <hlubek@networkteam.com>
252
	 */
253
	public function getVersion() {
254
		return $this->version;
255
	}
256

  
257
	/**
258
	 * Sets the package version
259
	 *
260
	 * @param string $version: The package version to set
261
	 * @author Christopher Hlubek <hlubek@networkteam.com>
262
	 */
263
	public function setVersion($version) {
264
		$this->version = $version;
265
	}
266

  
267
	/**
268
	 * Returns the package description
269
	 *
270
	 * @return string The package description
271
	 * @author  Christopher Hlubek <hlubek@networkteam.com>
272
	 */
273
	public function getDescription() {
274
		return $this->description;
275
	}
276

  
277
	/**
278
	 * Sets the package description
279
	 *
280
	 * @param string $description: The package description to set
281
	 * @author Christopher Hlubek <hlubek@networkteam.com>
282
	 */
283
	public function setDescription($description) {
284
		$this->description = $description;
285
	}
286

  
287
	/**
288
	 * Returns the state of the package.
289
	 *
290
	 * The package state can be one of the STATE_* constants
291
	 *
292
	 * @return string The package state
293
	 * @author  Christopher Hlubek <hlubek@networkteam.com>
294
	 */
295
	public function getState() {
296
		return $this->state;
297
	}
298

  
299
	/**
300
	 * @param string $state: The package state to set (Alpha, Beta, ...)
301
	 * @author  Christopher Hlubek <hlubek@networkteam.com>
302
	 */
303
	public function setState($state) {
304
		switch ($state) {
305
			case self::STATE_DEVELOPMENT :
306
			case self::STATE_ALPHA :
307
			case self::STATE_BETA :
308
			case self::STATE_RELEASECANDIDATE :
309
			case self::STATE_FINAL :
310
			case self::STATE_OBSOLETE :
311
				$this->state = $state;
312
				break;
313
			default:
314
				throw new InvalidArgumentException('"' . $state . '" is not a valid package state.', 1221477912);
315
	}
316

  
317
	/**
318
	 * Returns the categories.
319
	 *
320
	 * @return Array The categories this package is assigned to
321
	 * @author Christopher Hlubek <hlubek@networkteam.com>
322
	 */
323
	public function getCategories() {
324
		return $this->categories;
325
	}
326

  
327
	/**
328
	 * Adds a package category
329
	 *
330
	 * @param string $category A package category
331
	 * @return void
332
	 * @author Robert Lemke <robert@typo3.org>
333
	 */
334
	public function addCategory($category) {
335
		if (!is_string($category)) throw new InvalidArgumentException('A package category must be of type string.', 1221478079);
336
		$this->categories[] = $category;
337
	}
338

  
339
	/**
340
	 * Returns the parties involved in the making of the package
341
	 *
342
	 * @return array An array of F3::FLOW3::Package::Meta::Party objects
343
	 * @author  Christopher Hlubek <hlubek@networkteam.com>
344
	 */
345
	public function getParties() {
346
		return $this->parties;
347
	}
348

  
349
	/**
350
	 * Add a party which is involved in the making or maintenence of the package
351
	 *
352
	 * @param F3::FLOW3::Package::Meta::Party $party The party object
353
	 * @author Robert Lemke <robert@typo3.org>
354
	 */
355
	public function addParty(F3::FLOW3::Package::Meta::Party $party) {
356
		$this->parties[] = $party;
357
	}
358

  
359
	/**
360
	 * Returns the constraints of the package
361
	 *
362
	 * @param string $constraintType Type of the constraints to get: depends, conflicts, suggests
363
	 * @return array An array of F3::FLOW3::Package::Meta::Constraint objects
364
	 * @author  Christopher Hlubek <hlubek@networkteam.com>
365
	 */
366
	public function getConstraints($constraintType) {
367
		if(!isset($this->constraints[$constraintType])) return array();
368
		return $this->constraints[$constraintType];
369
	}
68 370

  
371
	/**
372
	 * Add a constraint
373
	 *
374
	 * @param F3::FLOW3::Package::Meta::Constraint $constraint
375
	 */
376
	public function addConstraint(F3::FLOW3::Package::Meta::Constraint $constraint) {
377
		$this->constraints[$constraint->getConstraintType()][] = $constraint;
378
	}
379
}
69 380
?>
Packages/FLOW3/Classes/Package/Meta/F3_FLOW3_Package_Meta_Party.php (revision 0)
1
<?php
2
declare(ENCODING = 'utf-8');
3
namespace F3::FLOW3::Package::Meta;
4

  
5
/*                                                                        *
6
 * This script is part of the TYPO3 project - inspiring people to share!  *
7
 *                                                                        *
8
 * TYPO3 is free software; you can redistribute it and/or modify it under *
9
 * the terms of the GNU General Public License version 2 as published by  *
10
 * the Free Software Foundation.                                          *
11
 *                                                                        *
12
 * This script is distributed in the hope that it will be useful, but     *
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
14
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
15
 * Public License for more details.                                       *
16
 *                                                                        */
17

  
18
/**
19
 * @package FLOW3
20
 * @subpackage Package
21
 * @version $Id:F3_FLOW3_Package_Meta.php 203 2007-03-30 13:17:37Z robert $
22
 */
23

  
24
/**
25
 * Party meta model for persons and companies
26
 *
27
 * @package FLOW3
28
 * @subpackage Package
29
 * @version $Id:F3_FLOW3_Package_Meta.php 203 2007-03-30 13:17:37Z robert $
30
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
31
 */
32
abstract class Party {
33
	
34
	/**
35
	 * The party role
36
	 * 
37
	 * @var string
38
	 */
39
	protected $role;
40

  
41
	/**
42
	 * Name of the party
43
	 * 
44
	 * @var string
45
	 */
46
	protected $name;
47
	
48
	/**
49
	 * Email of the party
50
	 * 
51
	 * @var string
52
	 */
53
	protected $email;
54
	
55
	/**
56
	 * Website of the party
57
	 * 
58
	 * @var string
59
	 */
60
	protected $website;
61
	
62
	/**
63
	 * Meta party model constructor
64
	 *
65
	 * @param string $role
66
	 * @param string $name
67
	 * @param string $email
68
	 * @param string $website
69
	 * @author Christopher Hlubek <hlubek@networkteam.com>
70
	 */
71
	public function __construct($role, $name, $email = null, $website = null) {
72
		$this->role = $role;
73
		$this->name = $name;
74
		$this->email = $email;
75
		$this->website = $website;
76
	}
77
	
78
	/**
79
	 * @return string The role of the party
80
	 * @author Christopher Hlubek <hlubek@networkteam.com>
81
	 */
82
	public function getRole() {
83
		return $this->role;
84
	}
85
	
86
	/**
87
	 * @return string The name of the party
88
	 * @author Christopher Hlubek <hlubek@networkteam.com>
89
	 */
90
	public function getName() {
91
		return $this->name;
92
	}
93
	
94
	/**
95
	 * @return string The email of the party
96
	 * @author Christopher Hlubek <hlubek@networkteam.com>
97
	 */
98
	public function getEmail() {
99
		return $this->email;
100
	}
101
	
102
	/**
103
	 * @return string The website of the party
104
	 * @author Christopher Hlubek <hlubek@networkteam.com>
105
	 */
106
	public function getWebsite() {
107
		return $this->website;
108
	}
109

  
110
	/**
111
	 * Write general party information to the XMLWriter.
112
	 * 
113
	 * Subclasses can contribute to the XML with
114
	 * writePartyXML(...).
115
	 *
116
	 * @param XMLWriter $xml
117
	 * @author Christopher Hlubek <hlubek@networkteam.com>
118
	 */
119
	public function writeXML(XMLWriter $xml) {
120
		$xml->startElement($this->getPartyType());
121
		
122
		if(strlen($this->role))	$xml->writeAttribute('role', $this->role);
123
		
124
		if(strlen($this->name)) $xml->writeElement('name', $this->name);
125
		if(strlen($this->email)) $xml->writeElement('email', $this->email);
126
		if(strlen($this->website)) $xml->writeElement('website', $this->website);
127
		
128
		$this->writePartyXML($xml);
129
		
130
		$xml->endElement(); // party
131
	}
132
	
133
	/**
134
	 * The party type will be used for the XML element name
135
	 * of the party.
136
	 * 
137
	 * @return string The type of the party (person, company)
138
	 * @author Christopher Hlubek <hlubek@networkteam.com>
139
	 */
140
	protected abstract function getPartyType();
141
	
142
	/**
143
	 * Stub for subclass contribution to the party XML.
144
	 *
145
	 * @param XMLWriter $xml
146
	 * @author Christopher Hlubek <hlubek@networkteam.com>
147
	 */
148
	protected function writePartyXML(XMLWriter $xml) {
149
		
150
	}
151
}
152
?>
Packages/FLOW3/Classes/Package/Meta/F3_FLOW3_Package_Meta_Person.php (revision 0)
1
<?php
2
declare(ENCODING = 'utf-8');
3
namespace F3::FLOW3::Package::Meta;
4

  
5
/*                                                                        *
6
 * This script is part of the TYPO3 project - inspiring people to share!  *
7
 *                                                                        *
8
 * TYPO3 is free software; you can redistribute it and/or modify it under *
9
 * the terms of the GNU General Public License version 2 as published by  *
10
 * the Free Software Foundation.                                          *
11
 *                                                                        *
12
 * This script is distributed in the hope that it will be useful, but     *
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
14
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
15
 * Public License for more details.                                       *
16
 *                                                                        */
17

  
18
/**
19
 * @package FLOW3
20
 * @subpackage Package
21
 * @version $Id:F3_FLOW3_Package_Meta.php 203 2007-03-30 13:17:37Z robert $
22
 */
23

  
24
/**
25
 * Package person party meta model
26
 *
27
 * @package FLOW3
28
 * @subpackage Package
29
 * @version $Id:F3_FLOW3_Package_Meta.php 203 2007-03-30 13:17:37Z robert $
30
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
31
 */
32
class Person extends F3::FLOW3::Package::Meta::Party {
33

  
34
	/**
35
	 * Company of the person
36
	 *
37
	 * @var string
38
	 */
39
	protected $company;
40

  
41
	/**
42
	 * Repository user name of the person
43
	 *
44
	 * @var string
45
	 */
46
	protected $repositoryUserName;
47

  
48
	/**
49
	 * Meta person model constructor
50
	 *
51
	 * @param string $role
52
	 * @param string $name
53
	 * @param string $email
54
	 * @param string $website
55
	 * @param string $company
56
	 * @param string $repositoryUserName
57
	 * @author Christopher Hlubek <hlubek@networkteam.com>
58
	 */
59
	public function __construct($role, $name, $email = null, $website = null, $company = null, $repositoryUserName = null) {
60
		parent::__construct($role, $name, $email, $website);
61

  
62
		$this->company = $company;
63
		$this->repositoryUserName = $repositoryUserName;
64
	}
65

  
66
	/**
67
	 *
68
	 *
69
	 * @return string The company of the person
70
	 * @author Christopher Hlubek <hlubek@networkteam.com>
71
	 */
72
	public function getCompany() {
73
		return $this->company;
74
	}
75

  
76
	/**
77
	 *
78
	 *
79
	 * @return string The repository username
80
	 * @author Christopher Hlubek <hlubek@networkteam.com>
81
	 */
82
	public function getRepositoryUserName() {
83
		return $this->repositoryUserName;
84
	}
85

  
86
	/**
87
	 *
88
	 *
89
	 * @return string Party type "person"
90
	 * @author Christopher Hlubek <hlubek@networkteam.com>
91
	 */
92
	protected function getPartyType() {
93
		return 'person';
94
	}
95

  
96
	/**
97
	 * Write additional information for the person to the XMLWriter
98
	 *
99
	 * @param XMLWriter $xml
100
	 * @author Christopher Hlubek <hlubek@networkteam.com>
101
	 */
102
	protected function writePartyXML(XMLWriter $xml) {
103
		if(strlen($this->company)) $xml->writeElement('company', $this->company);
104
		if(strlen($this->repositoryUserName)) $xml->writeElement('repositoryUserName', $this->repositoryUserName);
105
	}
106
}
107
?>
Packages/FLOW3/Classes/Package/Meta/F3_FLOW3_Package_Meta_Company.php (revision 0)
1
<?php
2
declare(ENCODING = 'utf-8');
3
namespace F3::FLOW3::Package::Meta;
4

  
5
/*                                                                        *
6
 * This script is part of the TYPO3 project - inspiring people to share!  *
7
 *                                                                        *
8
 * TYPO3 is free software; you can redistribute it and/or modify it under *
9
 * the terms of the GNU General Public License version 2 as published by  *
10
 * the Free Software Foundation.                                          *
11
 *                                                                        *
12
 * This script is distributed in the hope that it will be useful, but     *
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
14
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
15
 * Public License for more details.                                       *
16
 *                                                                        */
17

  
18
/**
19
 * @package FLOW3
20
 * @subpackage Package
21
 * @version $Id:F3_FLOW3_Package_Meta.php 203 2007-03-30 13:17:37Z robert $
22
 */
23

  
24
/**
25
 * Package company party meta model
26
 *
27
 * @package FLOW3
28
 * @subpackage Package
29
 * @version $Id:F3_FLOW3_Package_Meta.php 203 2007-03-30 13:17:37Z robert $
30
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
31
 */
32
class Company extends F3::FLOW3::Package::Meta::Party {
33

  
34
	/**
35
	 * Returns the party type
36
	 *
37
	 * @return string Party type "company"
38
	 * @author Christopher Hlubek <hlubek@networkteam.com>
39
	 */
40
	protected function getPartyType() {
41
		return 'company';
42
	}
43

  
44
}
45
?>
Packages/FLOW3/Classes/Package/Meta/F3_FLOW3_Package_Meta_PackageConstraint.php (revision 0)
1
<?php
2
declare(ENCODING = 'utf-8');
3
namespace F3::FLOW3::Package::Meta;
4

  
5
/*                                                                        *
6
 * This script is part of the TYPO3 project - inspiring people to share!  *
7
 *                                                                        *
8
 * TYPO3 is free software; you can redistribute it and/or modify it under *
9
 * the terms of the GNU General Public License version 2 as published by  *
10
 * the Free Software Foundation.                                          *
11
 *                                                                        *
12
 * This script is distributed in the hope that it will be useful, but     *
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
14
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
15
 * Public License for more details.                                       *
16
 *                                                                        */
17

  
18
/**
19
 * @package FLOW3
20
 * @subpackage Package
21
 * @version $Id:F3_FLOW3_Package_Meta.php 203 2007-03-30 13:17:37Z robert $
22
 */
23

  
24
/**
25
 * Package constraint meta model
26
 *
27
 * @package FLOW3
28
 * @subpackage Package
29
 * @version $Id:F3_FLOW3_Package_Meta.php 203 2007-03-30 13:17:37Z robert $
30
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
31
 */
32
class PackageConstraint extends F3::FLOW3::Package::Meta::Constraint {
33
	/**
34
	 * @see F3::FLOW3::Package::Meta::Constraint::getConstraintScope()
35
	 * @author Christopher Hlubek <hlubek@networkteam.com>
36
	 */
37
	protected function getConstraintScope() {
38
		return 'package';
39
	}
40
}
41
?>
Packages/FLOW3/Classes/Package/Meta/F3_FLOW3_Package_Meta_Constraint.php (revision 0)
1
<?php
2
declare(ENCODING = 'utf-8');
3

  
4
/*                                                                        *
5
 * This script is part of the TYPO3 project - inspiring people to share!  *
6
 *                                                                        *
7
 * TYPO3 is free software; you can redistribute it and/or modify it under *
8
 * the terms of the GNU General Public License version 2 as published by  *
9
 * the Free Software Foundation.                                          *
10
 *                                                                        *
11
 * This script is distributed in the hope that it will be useful, but     *
12
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
13
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
14
 * Public License for more details.                                       *
15
 *                                                                        */
16

  
17
/**
18
 * @package FLOW3
19
 * @subpackage Package
20
 * @version $Id:F3_FLOW3_Package_Meta.php 203 2007-03-30 13:17:37Z robert $
21
 */
22

  
23
/**
24
 * Constraint meta model
25
 *
26
 * @package FLOW3
27
 * @subpackage Package
28
 * @version $Id:F3_FLOW3_Package_Meta.php 203 2007-03-30 13:17:37Z robert $
29
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
30
 */
31
abstract class F3_FLOW3_Package_Meta_Constraint {
32
	
33
	/**
34
	 * One of depends, conflicts or suggests
35
	 *
36
	 * @var string The constraint type
37
	 */
38
	protected $constraintType;
39
	
40
	/**
41
	 * @var string The constraint name or value
42
	 */
43
	protected $value;
44
	
45
	/**
46
	 * @var string The minimum version
47
	 */
48
	protected $minVersion;
49
	
50
	/**
51
	 * @var string The maximum version
52
	 */
53
	protected $maxVersion;
54
	
55
	/**
56
	 * Meta constraint constructor
57
	 *
58
	 * @param string $constraintType
59
	 * @param string $value
60
	 * @param string $minVersion
61
	 * @param string $maxVersion
62
	 * @author Christopher Hlubek <hlubek@networkteam.com>
63
	 */
64
	public function __construct($constraintType, $value, $minVersion = null, $maxVersion = null) {
65
		$this->constraintType = $constraintType;
66
		$this->value = $value;
67
		$this->minVersion = $minVersion;
68
		$this->maxVersion = $maxVersion;
69
	}
70
	
71
	/**
72
	 * @return string The constraint name or value
73
	 * @author Christopher Hlubek <hlubek@networkteam.com>
74
	 */
75
	public function getValue() {
76
		return $this->value;
77
	}
78
	
79
	/**
80
	 * @return string The minimum version
81
	 * @author Christopher Hlubek <hlubek@networkteam.com>
82
	 */
83
	public function getMinVersion() {
84
		return $this->minVersion;
85
	}
86
	
87
	/**
88
	 * @return string The maximum version
89
	 * @author Christopher Hlubek <hlubek@networkteam.com>
90
	 */
91
	public function getMaxVersion() {
92
		return $this->maxVersion;
93
	}
94
	
95
	/**
96
	 * @return string The constraint type (depends, conflicts, suggests)
97
	 * @author Christopher Hlubek <hlubek@networkteam.com>
98
	 */
99
	public function getConstraintType() {
100
		return $this->constraintType;
101
	}
102

  
103
	/**
104
	 * Write the constraint to a XMLWriter instance. This will
105
	 * usually be used from the F3_FLOW3_Package_Meta to output
106
	 * the Package.xml.
107
	 * 
108
	 * The subclasses use the writeConstraintXML(...)
109
	 * template method to write additional XML. 
110
	 * 
111
	 * @param XMLWriter $xml: The XMLWriter to write to
112
	 * @author Christopher Hlubek <hlubek@networkteam.com>
113
	 */
114
	public function writeXML(XMLWriter $xml) {
115
		$xml->startElement($this->getConstraintScope());
116
		
117
		if(strlen($this->minVersion)) $xml->writeAttribute('minVersion', $this->minVersion);
118
		if(strlen($this->maxVersion)) $xml->writeAttribute('maxVersion', $this->maxVersion);
119
		
120
		// This has to come before text(...) to allow for writing of additional attributes from subclasses
121
		$this->writeConstraintXML($xml);
122
		
123
		if(strlen($this->value)) $xml->text($this->value);
124
		
125
		$xml->endElement(); // constraint
126
	}
127
	
128
	/**
129
	 * @return string The constraint scope (package, system)
130
	 */
131
	protected abstract function getConstraintScope();
132
	
133
	/**
134
	 * Stub method for writing additional XML
135
	 * in subclasses.
136
	 *
137
	 * @param XMLWriter $xml
138
	 */
139
	protected function writeConstraintXML(XMLWriter $xml) {
140
		
141
	}
142
}
143

  
144
?>
Packages/FLOW3/Classes/Package/Meta/F3_FLOW3_Package_Meta_SystemConstraint.php (revision 0)
1
<?php
2
declare(ENCODING = 'utf-8');
3

  
4
/*                                                                        *
5
 * This script is part of the TYPO3 project - inspiring people to share!  *
6
 *                                                                        *
7
 * TYPO3 is free software; you can redistribute it and/or modify it under *
8
 * the terms of the GNU General Public License version 2 as published by  *
9
 * the Free Software Foundation.                                          *
10
 *                                                                        *
11
 * This script is distributed in the hope that it will be useful, but     *
12
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
13
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
14
 * Public License for more details.                                       *
15
 *                                                                        */
16

  
17
/**
18
 * @package FLOW3
19
 * @subpackage Package
20
 * @version $Id:F3_FLOW3_Package_Meta.php 203 2007-03-30 13:17:37Z robert $
21
 */
22

  
23
/**
24
 * System constraint meta model
25
 *
26
 * @package FLOW3
27
 * @subpackage Package
28
 * @version $Id:F3_FLOW3_Package_Meta.php 203 2007-03-30 13:17:37Z robert $
29
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
30
 */
31
class F3_FLOW3_Package_Meta_SystemConstraint extends F3_FLOW3_Package_Meta_Constraint {
32
	
33
	/**
34
	 * The type for a system scope constraint (e.g. "Memory")
35
	 * 
36
	 * @var string
37
	 */
38
	protected $type;
39
	
40
	/**
41
	 * Meta system constraint constructor
42
	 *
43
	 * @param string $constraintType
44
	 * @param string $type
45
	 * @param string $value
46
	 * @param string $minVersion
47
	 * @param string $maxVersion
48
	 * @author Christopher Hlubek <hlubek@networkteam.com>
49
	 */
50
	public function __construct($constraintType, $type, $value = null, $minVersion = null, $maxVersion = null) {
51
		if(!strlen($value)) $value = null;
52
		parent::__construct($constraintType, $value, $minVersion, $maxVersion);
53
		$this->type = $type;
54
	}
55
	
56
	/**
57
	 * @return string The system constraint type
58
	 * @author Christopher Hlubek <hlubek@networkteam.com>
59
	 */
60
	public function getType() {
61
		return $this->type;
62
	}
63

  
64
	/**
65
	 * @see F3_FLOW3_Package_Meta_Constraint::getConstraintScope()
66
	 * @author Christopher Hlubek <hlubek@networkteam.com>
67
	 */
68
	protected function getConstraintScope() {
69
		return 'system';
70
	}
71
	
72
	/**
73
	 * Writes an additional type attribute to the system constraint element
74
	 *
75
	 * @param XMLWriter $xml
76
	 * @author Christopher Hlubek <hlubek@networkteam.com>
77
	 */
78
	protected function writeConstraintXML(XMLWriter $xml) {
79
		if(strlen($this->type)) $xml->writeAttribute('type', $this->type);
80
	}
81
}
82
?>
Packages/FLOW3/Tests/Package/F3_FLOW3_Package_PackageTest.php (working copy)
79 79
		$this->assertTrue($classFiles['F3::TestPackage::BasicClass'] == 'F3_TestPackage_BasicClass.php', 'Class files array contains wrong path for BasicClass!');
80 80
		$this->assertTrue($classFiles['F3::TestPackage::SubDirectory::ClassInSubDirectory'] == 'SubDirectory/F3_TestPackage_SubDirectory_ClassInSubDirectory.php', 'Class files array contains wrong path for ClassInSubDirectory!');
81 81
	}
82

  
83
	/**
84
	 * @test
85
	 * @author Robert Lemke <robert@typo3.org>
86
	 */
87
	public function getPackageMetaReturnsAMetaObject() {
88
		$mockPackageManager = $this->getMock('F3::FLOW3::Package::Manager', array(), array(), '', FALSE);
89
		$package = new F3::FLOW3::Package::Package('TestPackage', FLOW3_PATH_PACKAGES . 'TestPackage/', $mockPackageManager);
90

  
91
		$this->assertType('F3::FLOW3::Package::Meta', $package->getPackageMeta());
92
	}
82 93
}
83 94
?>
Packages/FLOW3/Tests/Package/F3_FLOW3_Package_MetaTest.php (revision 0)
1
<?php
2
declare(ENCODING = 'utf-8');
3
namespace F3::FLOW3::Package;
4

  
5
/*                                                                        *
6
 * This script is part of the TYPO3 project - inspiring people to share!  *
7
 *                                                                        *
8
 * TYPO3 is free software; you can redistribute it and/or modify it under *
9
 * the terms of the GNU General Public License version 2 as published by  *
10
 * the Free Software Foundation.                                          *
11
 *                                                                        *
12
 * This script is distributed in the hope that it will be useful, but     *
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
14
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
15
 * Public License for more details.                                       *
16
 *                                                                        */
17

  
18
/**
19
 * @package FLOW3
20
 * @subpackage Tests
21
 * @version $Id:F3_FLOW3_Package_Test.php 201 2007-03-30 11:18:30Z robert $
22
 */
23

  
24
/**
25
 * Testcase for the package meta class
26
 *
27
 * @package FLOW3
28
 * @subpackage Tests
29
 * @version $Id:F3_FLOW3_Package_Test.php 201 2007-03-30 11:18:30Z robert $
30
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
31
 */
32
class MetaTest extends F3::Testing::BaseTestCase {
33

  
34
	/**
35
	 * @test
36
	 * @author Christopher Hlubek <hlubek@networkteam.com>
37
	 */
38
	public function getPackageMetaWorks() {
39
		$package = new F3::FLOW3::Package::Package('TestPackage', FLOW3_PATH_PACKAGES . 'TestPackage/');
40
		$packageMeta = $package->getPackageMeta();
41
		$this->assertEquals('TestPackage', $packageMeta->getPackageKey());
42
		$this->assertEquals('Test package', $packageMeta->getTitle());
43
		$this->assertEquals('0.0.1', $packageMeta->getVersion());
44
		$this->assertEquals('This package is used for testing the package- and component manager', $packageMeta->getDescription());
45
		$this->assertEquals('Alpha', $packageMeta->getState());
46
		$this->assertEquals(array('System', 'Testing'), $packageMeta->getCategories());
47

  
48
		$parties = $packageMeta->getParties();
49
		$this->assertTrue(is_array($parties));
50
		$person1 = $parties[0];
51
		$this->assertType('F3::FLOW3::Package::Meta::Person', $person1);
52
		$this->assertEquals('LeadDeveloper', $person1->getRole());
53
		$this->assertEquals('Robert Lemke', $person1->getName());
54
		$this->assertEquals('robert@typo3.org', $person1->getEmail());
55
	}
56

  
57
	/**
58
	 * Check reading the package constraints from meta information
59
	 *
60
	 * @test
61
	 * @author Christopher Hlubek <hlubek@networkteam.com>
62
	 */
63
	public function getPackageMetaConstraintsWorks() {
64
		$package = new F3_FLOW3_Package_Package('TestPackage', FLOW3_PATH_PACKAGES . 'TestPackage/');
65
		$packageMeta = $package->getPackageMeta();
66

  
67
		$constraints = $packageMeta->getConstraints('depends');
68
		$this->assertTrue(is_array($constraints));
69

  
70
		$this->assertType('F3_FLOW3_Package_Meta_PackageConstraint', $constraints[0]);
71
		$this->assertEquals('depends', $constraints[0]->getConstraintType());
72
		$this->assertEquals('FLOW3', $constraints[0]->getValue());
73
		$this->assertEquals('1.0.0', $constraints[0]->getMinVersion());
74
		$this->assertEquals('1.9.9', $constraints[0]->getMaxVersion());
75
		$this->assertType('F3_FLOW3_Package_Meta_SystemConstraint', $constraints[1]);
76
		$this->assertNull($constraints[1]->getValue());
77
		$this->assertEquals('PHP', $constraints[1]->getType());
78
		$this->assertEquals('5.3.0', $constraints[1]->getMinVersion());
79
	}
80

  
81

  
82
	/**
83
	 * Check constructing the meta information model then
84
	 * creating a Package.xml
85
	 *
86
	 * @test
87
	 * @author Christopher Hlubek <hlubek@networkteam.com>
88
	 */
89
	public function testMetaModelToXML() {
90
		$packageManager = $this->componentFactory->getComponent('F3_FLOW3_Package_ManagerInterface');
91

  
92
		$meta = new F3_FLOW3_Package_Meta('YetAnotherTestPackage');
93
		$meta->setTitle('Yet another test package');
... This diff was truncated because it exceeds the maximum size that can be displayed.
(5-5/6)