@@ -19,114 +19,114 @@ |
||
19 | 19 | */ |
20 | 20 | class BackendUtility |
21 | 21 | { |
22 | - /******************************************* |
|
22 | + /******************************************* |
|
23 | 23 | * |
24 | 24 | * SQL-related, selecting records, searching |
25 | 25 | * |
26 | 26 | *******************************************/ |
27 | - /** |
|
28 | - * Returns the WHERE clause " AND NOT [tablename].[deleted-field]" if a deleted-field |
|
29 | - * is configured in $GLOBALS['TCA'] for the tablename, $table |
|
30 | - * This function should ALWAYS be called in the backend for selection on tables which |
|
31 | - * are configured in $GLOBALS['TCA'] since it will ensure consistent selection of records, |
|
32 | - * even if they are marked deleted (in which case the system must always treat them as non-existent!) |
|
33 | - * In the frontend a function, ->enableFields(), is known to filter hidden-field, start- and endtime |
|
34 | - * and fe_groups as well. But that is a job of the frontend, not the backend. If you need filtering |
|
35 | - * on those fields as well in the backend you can use ->BEenableFields() though. |
|
36 | - * |
|
37 | - * @param string $table Table name present in $GLOBALS['TCA'] |
|
38 | - * @param string $withLogicalSeparator Table alias if any |
|
39 | - * @return string WHERE clause for filtering out deleted records, eg " AND tablename.deleted=0 |
|
40 | - */ |
|
41 | - public static function deleteClause($table, $withLogicalSeparator = ' AND') |
|
42 | - { |
|
43 | - if (empty($GLOBALS['TCA'][$table]['ctrl']['delete'])) { |
|
44 | - return ''; |
|
45 | - } |
|
46 | - $expressionBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
|
47 | - ->getQueryBuilderForTable($table) |
|
48 | - ->expr(); |
|
49 | - return $withLogicalSeparator . ' ' . $expressionBuilder->eq( |
|
50 | - $table . '.' . $GLOBALS['TCA'][$table]['ctrl']['delete'], |
|
51 | - 0 |
|
52 | - ); |
|
53 | - } |
|
54 | - /** |
|
55 | - * Backend implementation of enableFields() |
|
56 | - * Notice that "fe_groups" is not selected for - only disabled, starttime and endtime. |
|
57 | - * Notice that deleted-fields are NOT filtered - you must ALSO call deleteClause in addition. |
|
58 | - * $GLOBALS["SIM_ACCESS_TIME"] is used for date. |
|
59 | - * |
|
60 | - * @param string $table The table from which to return enableFields WHERE clause. Table name must have a 'ctrl' section in $GLOBALS['TCA']. |
|
61 | - * @param bool $inv Means that the query will select all records NOT VISIBLE records (inverted selection) |
|
62 | - * @return string WHERE clause part |
|
63 | - */ |
|
64 | - public static function BEenableFields($table, $inv = false) |
|
65 | - { |
|
66 | - $ctrl = $GLOBALS['TCA'][$table]['ctrl']; |
|
67 | - $expressionBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
|
68 | - ->getConnectionForTable($table) |
|
69 | - ->getExpressionBuilder(); |
|
70 | - $query = $expressionBuilder->andX(); |
|
71 | - $invQuery = $expressionBuilder->orX(); |
|
27 | + /** |
|
28 | + * Returns the WHERE clause " AND NOT [tablename].[deleted-field]" if a deleted-field |
|
29 | + * is configured in $GLOBALS['TCA'] for the tablename, $table |
|
30 | + * This function should ALWAYS be called in the backend for selection on tables which |
|
31 | + * are configured in $GLOBALS['TCA'] since it will ensure consistent selection of records, |
|
32 | + * even if they are marked deleted (in which case the system must always treat them as non-existent!) |
|
33 | + * In the frontend a function, ->enableFields(), is known to filter hidden-field, start- and endtime |
|
34 | + * and fe_groups as well. But that is a job of the frontend, not the backend. If you need filtering |
|
35 | + * on those fields as well in the backend you can use ->BEenableFields() though. |
|
36 | + * |
|
37 | + * @param string $table Table name present in $GLOBALS['TCA'] |
|
38 | + * @param string $withLogicalSeparator Table alias if any |
|
39 | + * @return string WHERE clause for filtering out deleted records, eg " AND tablename.deleted=0 |
|
40 | + */ |
|
41 | + public static function deleteClause($table, $withLogicalSeparator = ' AND') |
|
42 | + { |
|
43 | + if (empty($GLOBALS['TCA'][$table]['ctrl']['delete'])) { |
|
44 | + return ''; |
|
45 | + } |
|
46 | + $expressionBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
|
47 | + ->getQueryBuilderForTable($table) |
|
48 | + ->expr(); |
|
49 | + return $withLogicalSeparator . ' ' . $expressionBuilder->eq( |
|
50 | + $table . '.' . $GLOBALS['TCA'][$table]['ctrl']['delete'], |
|
51 | + 0 |
|
52 | + ); |
|
53 | + } |
|
54 | + /** |
|
55 | + * Backend implementation of enableFields() |
|
56 | + * Notice that "fe_groups" is not selected for - only disabled, starttime and endtime. |
|
57 | + * Notice that deleted-fields are NOT filtered - you must ALSO call deleteClause in addition. |
|
58 | + * $GLOBALS["SIM_ACCESS_TIME"] is used for date. |
|
59 | + * |
|
60 | + * @param string $table The table from which to return enableFields WHERE clause. Table name must have a 'ctrl' section in $GLOBALS['TCA']. |
|
61 | + * @param bool $inv Means that the query will select all records NOT VISIBLE records (inverted selection) |
|
62 | + * @return string WHERE clause part |
|
63 | + */ |
|
64 | + public static function BEenableFields($table, $inv = false) |
|
65 | + { |
|
66 | + $ctrl = $GLOBALS['TCA'][$table]['ctrl']; |
|
67 | + $expressionBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
|
68 | + ->getConnectionForTable($table) |
|
69 | + ->getExpressionBuilder(); |
|
70 | + $query = $expressionBuilder->andX(); |
|
71 | + $invQuery = $expressionBuilder->orX(); |
|
72 | 72 | |
73 | - if (is_array($ctrl)) { |
|
74 | - if (is_array($ctrl['enablecolumns'])) { |
|
75 | - if ($ctrl['enablecolumns']['disabled'] ?? false) { |
|
76 | - $field = $table . '.' . $ctrl['enablecolumns']['disabled']; |
|
77 | - $query->add($expressionBuilder->eq($field, 0)); |
|
78 | - $invQuery->add($expressionBuilder->neq($field, 0)); |
|
79 | - } |
|
80 | - if ($ctrl['enablecolumns']['starttime'] ?? false) { |
|
81 | - $field = $table . '.' . $ctrl['enablecolumns']['starttime']; |
|
82 | - $query->add($expressionBuilder->lte($field, (int)GeneralUtility::makeInstance(Context::class)->getPropertyFromAspect('date', 'timestamp'))); |
|
83 | - $invQuery->add( |
|
84 | - $expressionBuilder->andX( |
|
85 | - $expressionBuilder->neq($field, 0), |
|
86 | - $expressionBuilder->gt($field, (int)GeneralUtility::makeInstance(Context::class)->getPropertyFromAspect('date', 'timestamp')) |
|
87 | - ) |
|
88 | - ); |
|
89 | - } |
|
90 | - if ($ctrl['enablecolumns']['endtime'] ?? false) { |
|
91 | - $field = $table . '.' . $ctrl['enablecolumns']['endtime']; |
|
92 | - $query->add( |
|
93 | - $expressionBuilder->orX( |
|
94 | - $expressionBuilder->eq($field, 0), |
|
95 | - $expressionBuilder->gt($field, (int)GeneralUtility::makeInstance(Context::class)->getPropertyFromAspect('date', 'timestamp')) |
|
96 | - ) |
|
97 | - ); |
|
98 | - $invQuery->add( |
|
99 | - $expressionBuilder->andX( |
|
100 | - $expressionBuilder->neq($field, 0), |
|
101 | - $expressionBuilder->lte($field, (int)GeneralUtility::makeInstance(Context::class)->getPropertyFromAspect('date', 'timestamp')) |
|
102 | - ) |
|
103 | - ); |
|
104 | - } |
|
105 | - } |
|
106 | - } |
|
73 | + if (is_array($ctrl)) { |
|
74 | + if (is_array($ctrl['enablecolumns'])) { |
|
75 | + if ($ctrl['enablecolumns']['disabled'] ?? false) { |
|
76 | + $field = $table . '.' . $ctrl['enablecolumns']['disabled']; |
|
77 | + $query->add($expressionBuilder->eq($field, 0)); |
|
78 | + $invQuery->add($expressionBuilder->neq($field, 0)); |
|
79 | + } |
|
80 | + if ($ctrl['enablecolumns']['starttime'] ?? false) { |
|
81 | + $field = $table . '.' . $ctrl['enablecolumns']['starttime']; |
|
82 | + $query->add($expressionBuilder->lte($field, (int)GeneralUtility::makeInstance(Context::class)->getPropertyFromAspect('date', 'timestamp'))); |
|
83 | + $invQuery->add( |
|
84 | + $expressionBuilder->andX( |
|
85 | + $expressionBuilder->neq($field, 0), |
|
86 | + $expressionBuilder->gt($field, (int)GeneralUtility::makeInstance(Context::class)->getPropertyFromAspect('date', 'timestamp')) |
|
87 | + ) |
|
88 | + ); |
|
89 | + } |
|
90 | + if ($ctrl['enablecolumns']['endtime'] ?? false) { |
|
91 | + $field = $table . '.' . $ctrl['enablecolumns']['endtime']; |
|
92 | + $query->add( |
|
93 | + $expressionBuilder->orX( |
|
94 | + $expressionBuilder->eq($field, 0), |
|
95 | + $expressionBuilder->gt($field, (int)GeneralUtility::makeInstance(Context::class)->getPropertyFromAspect('date', 'timestamp')) |
|
96 | + ) |
|
97 | + ); |
|
98 | + $invQuery->add( |
|
99 | + $expressionBuilder->andX( |
|
100 | + $expressionBuilder->neq($field, 0), |
|
101 | + $expressionBuilder->lte($field, (int)GeneralUtility::makeInstance(Context::class)->getPropertyFromAspect('date', 'timestamp')) |
|
102 | + ) |
|
103 | + ); |
|
104 | + } |
|
105 | + } |
|
106 | + } |
|
107 | 107 | |
108 | - if ($query->count() === 0) { |
|
109 | - return ''; |
|
110 | - } |
|
108 | + if ($query->count() === 0) { |
|
109 | + return ''; |
|
110 | + } |
|
111 | 111 | |
112 | - return ' AND ' . ($inv ? $invQuery : $query); |
|
113 | - } |
|
112 | + return ' AND ' . ($inv ? $invQuery : $query); |
|
113 | + } |
|
114 | 114 | |
115 | - /** |
|
116 | - * Returns the URL to a given module |
|
117 | - * |
|
118 | - * @param string $moduleName Name of the module |
|
119 | - * @param array $urlParameters URL parameters that should be added as key value pairs |
|
120 | - * @return string Calculated URL |
|
121 | - */ |
|
122 | - public static function getModuleUrl($moduleName, $urlParameters = []) |
|
123 | - { |
|
124 | - $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class); |
|
125 | - try { |
|
126 | - $uri = $uriBuilder->buildUriFromRoute($moduleName, $urlParameters); |
|
127 | - } catch (RouteNotFoundException $e) { |
|
128 | - $uri = $uriBuilder->buildUriFromRoutePath($moduleName, $urlParameters); |
|
129 | - } |
|
130 | - return (string)$uri; |
|
131 | - } |
|
115 | + /** |
|
116 | + * Returns the URL to a given module |
|
117 | + * |
|
118 | + * @param string $moduleName Name of the module |
|
119 | + * @param array $urlParameters URL parameters that should be added as key value pairs |
|
120 | + * @return string Calculated URL |
|
121 | + */ |
|
122 | + public static function getModuleUrl($moduleName, $urlParameters = []) |
|
123 | + { |
|
124 | + $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class); |
|
125 | + try { |
|
126 | + $uri = $uriBuilder->buildUriFromRoute($moduleName, $urlParameters); |
|
127 | + } catch (RouteNotFoundException $e) { |
|
128 | + $uri = $uriBuilder->buildUriFromRoutePath($moduleName, $urlParameters); |
|
129 | + } |
|
130 | + return (string)$uri; |
|
131 | + } |
|
132 | 132 | } |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | $expressionBuilder = GeneralUtility::makeInstance(ConnectionPool::class) |
47 | 47 | ->getQueryBuilderForTable($table) |
48 | 48 | ->expr(); |
49 | - return $withLogicalSeparator . ' ' . $expressionBuilder->eq( |
|
50 | - $table . '.' . $GLOBALS['TCA'][$table]['ctrl']['delete'], |
|
49 | + return $withLogicalSeparator.' '.$expressionBuilder->eq( |
|
50 | + $table.'.'.$GLOBALS['TCA'][$table]['ctrl']['delete'], |
|
51 | 51 | 0 |
52 | 52 | ); |
53 | 53 | } |
@@ -73,12 +73,12 @@ discard block |
||
73 | 73 | if (is_array($ctrl)) { |
74 | 74 | if (is_array($ctrl['enablecolumns'])) { |
75 | 75 | if ($ctrl['enablecolumns']['disabled'] ?? false) { |
76 | - $field = $table . '.' . $ctrl['enablecolumns']['disabled']; |
|
76 | + $field = $table.'.'.$ctrl['enablecolumns']['disabled']; |
|
77 | 77 | $query->add($expressionBuilder->eq($field, 0)); |
78 | 78 | $invQuery->add($expressionBuilder->neq($field, 0)); |
79 | 79 | } |
80 | 80 | if ($ctrl['enablecolumns']['starttime'] ?? false) { |
81 | - $field = $table . '.' . $ctrl['enablecolumns']['starttime']; |
|
81 | + $field = $table.'.'.$ctrl['enablecolumns']['starttime']; |
|
82 | 82 | $query->add($expressionBuilder->lte($field, (int)GeneralUtility::makeInstance(Context::class)->getPropertyFromAspect('date', 'timestamp'))); |
83 | 83 | $invQuery->add( |
84 | 84 | $expressionBuilder->andX( |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | ); |
89 | 89 | } |
90 | 90 | if ($ctrl['enablecolumns']['endtime'] ?? false) { |
91 | - $field = $table . '.' . $ctrl['enablecolumns']['endtime']; |
|
91 | + $field = $table.'.'.$ctrl['enablecolumns']['endtime']; |
|
92 | 92 | $query->add( |
93 | 93 | $expressionBuilder->orX( |
94 | 94 | $expressionBuilder->eq($field, 0), |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | return ''; |
110 | 110 | } |
111 | 111 | |
112 | - return ' AND ' . ($inv ? $invQuery : $query); |
|
112 | + return ' AND '.($inv ? $invQuery : $query); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -8,32 +8,32 @@ |
||
8 | 8 | defined('TYPO3') or die(); |
9 | 9 | |
10 | 10 | call_user_func(function () { |
11 | - $configuration = GeneralUtility::makeInstance( |
|
12 | - ExtensionConfiguration::class |
|
13 | - )->get('vidi'); |
|
14 | - |
|
15 | - if (false === isset($configuration['autoload_typoscript']) || true === (bool)$configuration['autoload_typoscript']) { |
|
16 | - ExtensionManagementUtility::addTypoScript( |
|
17 | - 'vidi', |
|
18 | - 'constants', |
|
19 | - '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:vidi/Configuration/TypoScript/constants.txt">' |
|
20 | - ); |
|
21 | - |
|
22 | - ExtensionManagementUtility::addTypoScript( |
|
23 | - 'vidi', |
|
24 | - 'setup', |
|
25 | - '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:vidi/Configuration/TypoScript/setup.txt">' |
|
26 | - ); |
|
27 | - } |
|
28 | - |
|
29 | - // Initialize generic Vidi modules after the TCA is loaded. |
|
30 | - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['extTablesInclusion-PostProcessing'][] = 'Fab\Vidi\Configuration\VidiModulesAspect'; |
|
31 | - |
|
32 | - // Initialize generic grid TCA for all data types |
|
33 | - $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['extTablesInclusion-PostProcessing'][] = 'Fab\Vidi\Configuration\TcaGridAspect'; |
|
34 | - |
|
35 | - // cache configuration, see https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/CachingFramework/Configuration/Index.html#cache-configurations |
|
36 | - $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['vidi']['frontend'] = VariableFrontend::class; |
|
37 | - $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['vidi']['groups'] = array('all', 'vidi'); |
|
38 | - $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['vidi']['options']['defaultLifetime'] = 2592000; |
|
11 | + $configuration = GeneralUtility::makeInstance( |
|
12 | + ExtensionConfiguration::class |
|
13 | + )->get('vidi'); |
|
14 | + |
|
15 | + if (false === isset($configuration['autoload_typoscript']) || true === (bool)$configuration['autoload_typoscript']) { |
|
16 | + ExtensionManagementUtility::addTypoScript( |
|
17 | + 'vidi', |
|
18 | + 'constants', |
|
19 | + '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:vidi/Configuration/TypoScript/constants.txt">' |
|
20 | + ); |
|
21 | + |
|
22 | + ExtensionManagementUtility::addTypoScript( |
|
23 | + 'vidi', |
|
24 | + 'setup', |
|
25 | + '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:vidi/Configuration/TypoScript/setup.txt">' |
|
26 | + ); |
|
27 | + } |
|
28 | + |
|
29 | + // Initialize generic Vidi modules after the TCA is loaded. |
|
30 | + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['extTablesInclusion-PostProcessing'][] = 'Fab\Vidi\Configuration\VidiModulesAspect'; |
|
31 | + |
|
32 | + // Initialize generic grid TCA for all data types |
|
33 | + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['extTablesInclusion-PostProcessing'][] = 'Fab\Vidi\Configuration\TcaGridAspect'; |
|
34 | + |
|
35 | + // cache configuration, see https://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/CachingFramework/Configuration/Index.html#cache-configurations |
|
36 | + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['vidi']['frontend'] = VariableFrontend::class; |
|
37 | + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['vidi']['groups'] = array('all', 'vidi'); |
|
38 | + $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['vidi']['options']['defaultLifetime'] = 2592000; |
|
39 | 39 | }); |
@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | defined('TYPO3') or die(); |
9 | 9 | |
10 | -call_user_func(function () { |
|
10 | +call_user_func(function() { |
|
11 | 11 | $configuration = GeneralUtility::makeInstance( |
12 | 12 | ExtensionConfiguration::class |
13 | 13 | )->get('vidi'); |
@@ -24,118 +24,118 @@ |
||
24 | 24 | */ |
25 | 25 | class ContentTest extends AbstractFunctionalTestCase |
26 | 26 | { |
27 | - /** |
|
28 | - * @var Content |
|
29 | - */ |
|
30 | - private $fixture; |
|
27 | + /** |
|
28 | + * @var Content |
|
29 | + */ |
|
30 | + private $fixture; |
|
31 | 31 | |
32 | - /** |
|
33 | - * @var string |
|
34 | - */ |
|
35 | - private $dataType = 'tx_foo_domain_model_bar'; |
|
32 | + /** |
|
33 | + * @var string |
|
34 | + */ |
|
35 | + private $dataType = 'tx_foo_domain_model_bar'; |
|
36 | 36 | |
37 | - public function setUp() |
|
38 | - { |
|
39 | - parent::setUp(); |
|
40 | - $GLOBALS['TCA'][$this->dataType]['columns'] = array( |
|
41 | - 'foo' => [], |
|
42 | - 'foo_bar' => [], |
|
43 | - ); |
|
44 | - $this->fixture = new Content($this->dataType); |
|
45 | - } |
|
37 | + public function setUp() |
|
38 | + { |
|
39 | + parent::setUp(); |
|
40 | + $GLOBALS['TCA'][$this->dataType]['columns'] = array( |
|
41 | + 'foo' => [], |
|
42 | + 'foo_bar' => [], |
|
43 | + ); |
|
44 | + $this->fixture = new Content($this->dataType); |
|
45 | + } |
|
46 | 46 | |
47 | - public function tearDown() |
|
48 | - { |
|
49 | - unset($this->fixture, $GLOBALS['TCA'][$this->dataType]); |
|
50 | - } |
|
47 | + public function tearDown() |
|
48 | + { |
|
49 | + unset($this->fixture, $GLOBALS['TCA'][$this->dataType]); |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * @test |
|
54 | - * @dataProvider fieldNameProvider |
|
55 | - */ |
|
56 | - public function fieldNameIsConvertedToPropertyName($fieldName, $propertyName) |
|
57 | - { |
|
58 | - $data = array( |
|
59 | - $fieldName => 'foo data', |
|
60 | - ); |
|
61 | - $object = new Content($this->dataType, $data); |
|
62 | - $this->assertObjectHasAttribute($propertyName, $object); |
|
63 | - } |
|
52 | + /** |
|
53 | + * @test |
|
54 | + * @dataProvider fieldNameProvider |
|
55 | + */ |
|
56 | + public function fieldNameIsConvertedToPropertyName($fieldName, $propertyName) |
|
57 | + { |
|
58 | + $data = array( |
|
59 | + $fieldName => 'foo data', |
|
60 | + ); |
|
61 | + $object = new Content($this->dataType, $data); |
|
62 | + $this->assertObjectHasAttribute($propertyName, $object); |
|
63 | + } |
|
64 | 64 | |
65 | - /** |
|
66 | - * @test |
|
67 | - * @dataProvider fieldNameProvider |
|
68 | - */ |
|
69 | - public function accessValueOfArrayObjectReturnsFooDataAsString($fieldName) |
|
70 | - { |
|
71 | - $data = array( |
|
72 | - $fieldName => 'foo data', |
|
73 | - ); |
|
74 | - $this->markTestIncomplete(); # TCA must be faked |
|
75 | - #$object = new \Fab\Vidi\Domain\Model\Content($this->dataType, $data); |
|
76 | - #$this->assertSame($data[$fieldName], $object[$fieldName]); |
|
77 | - } |
|
65 | + /** |
|
66 | + * @test |
|
67 | + * @dataProvider fieldNameProvider |
|
68 | + */ |
|
69 | + public function accessValueOfArrayObjectReturnsFooDataAsString($fieldName) |
|
70 | + { |
|
71 | + $data = array( |
|
72 | + $fieldName => 'foo data', |
|
73 | + ); |
|
74 | + $this->markTestIncomplete(); # TCA must be faked |
|
75 | + #$object = new \Fab\Vidi\Domain\Model\Content($this->dataType, $data); |
|
76 | + #$this->assertSame($data[$fieldName], $object[$fieldName]); |
|
77 | + } |
|
78 | 78 | |
79 | - /** |
|
80 | - * @test |
|
81 | - * @dataProvider fieldNameProvider |
|
82 | - */ |
|
83 | - public function getValueThroughGetterReturnsFooDataAsString($fieldName, $propertyName) |
|
84 | - { |
|
85 | - $data = array( |
|
86 | - $fieldName => 'foo data', |
|
87 | - ); |
|
88 | - $this->markTestIncomplete(); # TCA must be faked |
|
89 | - #$object = new \Fab\Vidi\Domain\Model\Content($this->dataType, $data); |
|
90 | - #$getter = 'get' . ucfirst($propertyName); |
|
91 | - #$this->assertSame($data[$fieldName], $object->$getter()); |
|
92 | - } |
|
79 | + /** |
|
80 | + * @test |
|
81 | + * @dataProvider fieldNameProvider |
|
82 | + */ |
|
83 | + public function getValueThroughGetterReturnsFooDataAsString($fieldName, $propertyName) |
|
84 | + { |
|
85 | + $data = array( |
|
86 | + $fieldName => 'foo data', |
|
87 | + ); |
|
88 | + $this->markTestIncomplete(); # TCA must be faked |
|
89 | + #$object = new \Fab\Vidi\Domain\Model\Content($this->dataType, $data); |
|
90 | + #$getter = 'get' . ucfirst($propertyName); |
|
91 | + #$this->assertSame($data[$fieldName], $object->$getter()); |
|
92 | + } |
|
93 | 93 | |
94 | - /** |
|
95 | - * @test |
|
96 | - * @dataProvider fieldNameProvider |
|
97 | - */ |
|
98 | - public function toArrayMethodContainsGivenFieldName($fieldName) |
|
99 | - { |
|
100 | - $data = array( |
|
101 | - $fieldName => 'foo data', |
|
102 | - ); |
|
103 | - $object = new Content($this->dataType, $data); |
|
104 | - $array = $object->toArray(); |
|
105 | - $this->assertArrayHasKey($fieldName, $array); |
|
106 | - } |
|
94 | + /** |
|
95 | + * @test |
|
96 | + * @dataProvider fieldNameProvider |
|
97 | + */ |
|
98 | + public function toArrayMethodContainsGivenFieldName($fieldName) |
|
99 | + { |
|
100 | + $data = array( |
|
101 | + $fieldName => 'foo data', |
|
102 | + ); |
|
103 | + $object = new Content($this->dataType, $data); |
|
104 | + $array = $object->toArray(); |
|
105 | + $this->assertArrayHasKey($fieldName, $array); |
|
106 | + } |
|
107 | 107 | |
108 | - /** |
|
109 | - * Provider |
|
110 | - */ |
|
111 | - public function fieldNameProvider() |
|
112 | - { |
|
113 | - return array( |
|
114 | - array('foo', 'foo'), |
|
115 | - array('foo_bar', 'fooBar'), |
|
116 | - ); |
|
117 | - } |
|
108 | + /** |
|
109 | + * Provider |
|
110 | + */ |
|
111 | + public function fieldNameProvider() |
|
112 | + { |
|
113 | + return array( |
|
114 | + array('foo', 'foo'), |
|
115 | + array('foo_bar', 'fooBar'), |
|
116 | + ); |
|
117 | + } |
|
118 | 118 | |
119 | - /** |
|
120 | - * @test |
|
121 | - * @dataProvider propertyProvider |
|
122 | - */ |
|
123 | - public function testProperty($propertyName, $value) |
|
124 | - { |
|
125 | - $setter = 'set' . ucfirst($propertyName); |
|
126 | - $getter = 'get' . ucfirst($propertyName); |
|
127 | - $this->markTestIncomplete(); # TCA must be faked |
|
128 | - #call_user_func_array(array($this->fixture, $setter), array($value)); |
|
129 | - #$this->assertEquals($value, call_user_func(array($this->fixture, $getter))); |
|
130 | - } |
|
119 | + /** |
|
120 | + * @test |
|
121 | + * @dataProvider propertyProvider |
|
122 | + */ |
|
123 | + public function testProperty($propertyName, $value) |
|
124 | + { |
|
125 | + $setter = 'set' . ucfirst($propertyName); |
|
126 | + $getter = 'get' . ucfirst($propertyName); |
|
127 | + $this->markTestIncomplete(); # TCA must be faked |
|
128 | + #call_user_func_array(array($this->fixture, $setter), array($value)); |
|
129 | + #$this->assertEquals($value, call_user_func(array($this->fixture, $getter))); |
|
130 | + } |
|
131 | 131 | |
132 | - /** |
|
133 | - * Provider |
|
134 | - */ |
|
135 | - public function propertyProvider() |
|
136 | - { |
|
137 | - return array( |
|
138 | - array('username', 'foo'), |
|
139 | - ); |
|
140 | - } |
|
132 | + /** |
|
133 | + * Provider |
|
134 | + */ |
|
135 | + public function propertyProvider() |
|
136 | + { |
|
137 | + return array( |
|
138 | + array('username', 'foo'), |
|
139 | + ); |
|
140 | + } |
|
141 | 141 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | use Fab\Vidi\Tests\Functional\AbstractFunctionalTestCase; |
19 | 19 | |
20 | -require_once dirname(dirname(dirname(__FILE__))) . '/AbstractFunctionalTestCase.php'; |
|
20 | +require_once dirname(dirname(dirname(__FILE__))).'/AbstractFunctionalTestCase.php'; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Test case for class \Fab\Vidi\Domain\Model\Content. |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function testProperty($propertyName, $value) |
124 | 124 | { |
125 | - $setter = 'set' . ucfirst($propertyName); |
|
126 | - $getter = 'get' . ucfirst($propertyName); |
|
125 | + $setter = 'set'.ucfirst($propertyName); |
|
126 | + $getter = 'get'.ucfirst($propertyName); |
|
127 | 127 | $this->markTestIncomplete(); # TCA must be faked |
128 | 128 | #call_user_func_array(array($this->fixture, $setter), array($value)); |
129 | 129 | #$this->assertEquals($value, call_user_func(array($this->fixture, $getter))); |
@@ -9,12 +9,12 @@ |
||
9 | 9 | */ |
10 | 10 | abstract class AbstractFunctionalTestCase extends FunctionalTestCase |
11 | 11 | { |
12 | - protected $testExtensionsToLoad = array('typo3conf/ext/vidi'); |
|
12 | + protected $testExtensionsToLoad = array('typo3conf/ext/vidi'); |
|
13 | 13 | |
14 | - protected $coreExtensionsToLoad = array('extbase', 'fluid', 'scheduler'); |
|
14 | + protected $coreExtensionsToLoad = array('extbase', 'fluid', 'scheduler'); |
|
15 | 15 | |
16 | - public function setUp(): void |
|
17 | - { |
|
18 | - parent::setUp(); |
|
19 | - } |
|
16 | + public function setUp(): void |
|
17 | + { |
|
18 | + parent::setUp(); |
|
19 | + } |
|
20 | 20 | } |
@@ -24,101 +24,101 @@ |
||
24 | 24 | */ |
25 | 25 | class ModuleLoaderTest extends AbstractFunctionalTestCase |
26 | 26 | { |
27 | - /** |
|
28 | - * @var ModuleLoader |
|
29 | - */ |
|
30 | - private $fixture; |
|
31 | - |
|
32 | - /** |
|
33 | - * @var string |
|
34 | - */ |
|
35 | - private $dataType = 'tx_foo'; |
|
36 | - |
|
37 | - /** |
|
38 | - * @var string |
|
39 | - */ |
|
40 | - private $moduleCode = 'user_VidiTxFooM1'; |
|
41 | - |
|
42 | - |
|
43 | - public function setUp() |
|
44 | - { |
|
45 | - parent::setUp(); |
|
46 | - $this->fixture = new ModuleLoader($this->dataType); |
|
47 | - $this->fixture->register(); |
|
48 | - } |
|
49 | - |
|
50 | - public function tearDown() |
|
51 | - { |
|
52 | - unset($this->fixture); |
|
53 | - } |
|
54 | - |
|
55 | - /** |
|
56 | - * @test |
|
57 | - * @dataProvider attributeValueProvider |
|
58 | - */ |
|
59 | - public function attributeCanBeSet($attribute, $value) |
|
60 | - { |
|
61 | - $setter = 'set' . ucfirst($attribute); |
|
62 | - $this->fixture->$setter($value); |
|
63 | - $this->assertAttributeEquals($value, $attribute, $this->fixture); |
|
64 | - } |
|
65 | - |
|
66 | - /** |
|
67 | - * Provider |
|
68 | - */ |
|
69 | - public function attributeValueProvider() |
|
70 | - { |
|
71 | - return array( |
|
72 | - array('icon', 'bar'), |
|
73 | - array('moduleLanguageFile', 'bar'), |
|
74 | - ); |
|
75 | - } |
|
76 | - |
|
77 | - /** |
|
78 | - * @test |
|
79 | - * @dataProvider attributeProvider |
|
80 | - */ |
|
81 | - public function testAttribute($attribute, $defaultValue) |
|
82 | - { |
|
83 | - $this->assertAttributeEquals($defaultValue, $attribute, $this->fixture); |
|
84 | - } |
|
85 | - |
|
86 | - /** |
|
87 | - * Provider |
|
88 | - */ |
|
89 | - public function attributeProvider() |
|
90 | - { |
|
91 | - return array( |
|
92 | - array('dataType', $this->dataType), |
|
93 | - array('moduleKey', 'm1'), |
|
94 | - array('icon', 'EXT:vidi/ext_icon.gif') |
|
95 | - ); |
|
96 | - } |
|
97 | - |
|
98 | - /** |
|
99 | - * @test |
|
100 | - */ |
|
101 | - public function getModuleConfigurationReturnsArrayWithSomeKeys() |
|
102 | - { |
|
103 | - $moduleLoader = new ModuleLoader($this->dataType); |
|
104 | - $moduleLoader->register(); |
|
105 | - $GLOBALS['_GET']['M'] = $this->moduleCode; |
|
106 | - |
|
107 | - $moduleConfiguration = $moduleLoader->getModuleConfiguration(); |
|
108 | - $keys = array('dataType', 'additionalJavaScriptFiles', 'additionalStyleSheetFiles'); |
|
109 | - foreach ($keys as $key) { |
|
110 | - $this->assertArrayHasKey($key, $moduleConfiguration); |
|
111 | - } |
|
112 | - } |
|
113 | - |
|
114 | - /** |
|
115 | - * @test |
|
116 | - */ |
|
117 | - public function getModuleConfigurationWithParameterDataTypeReturnsDataType() |
|
118 | - { |
|
119 | - $moduleLoader = new ModuleLoader($this->dataType); |
|
120 | - $moduleLoader->register(); |
|
121 | - $GLOBALS['_GET']['M'] = $this->moduleCode; |
|
122 | - $this->assertEquals($this->dataType, $moduleLoader->getModuleConfiguration('dataType')); |
|
123 | - } |
|
27 | + /** |
|
28 | + * @var ModuleLoader |
|
29 | + */ |
|
30 | + private $fixture; |
|
31 | + |
|
32 | + /** |
|
33 | + * @var string |
|
34 | + */ |
|
35 | + private $dataType = 'tx_foo'; |
|
36 | + |
|
37 | + /** |
|
38 | + * @var string |
|
39 | + */ |
|
40 | + private $moduleCode = 'user_VidiTxFooM1'; |
|
41 | + |
|
42 | + |
|
43 | + public function setUp() |
|
44 | + { |
|
45 | + parent::setUp(); |
|
46 | + $this->fixture = new ModuleLoader($this->dataType); |
|
47 | + $this->fixture->register(); |
|
48 | + } |
|
49 | + |
|
50 | + public function tearDown() |
|
51 | + { |
|
52 | + unset($this->fixture); |
|
53 | + } |
|
54 | + |
|
55 | + /** |
|
56 | + * @test |
|
57 | + * @dataProvider attributeValueProvider |
|
58 | + */ |
|
59 | + public function attributeCanBeSet($attribute, $value) |
|
60 | + { |
|
61 | + $setter = 'set' . ucfirst($attribute); |
|
62 | + $this->fixture->$setter($value); |
|
63 | + $this->assertAttributeEquals($value, $attribute, $this->fixture); |
|
64 | + } |
|
65 | + |
|
66 | + /** |
|
67 | + * Provider |
|
68 | + */ |
|
69 | + public function attributeValueProvider() |
|
70 | + { |
|
71 | + return array( |
|
72 | + array('icon', 'bar'), |
|
73 | + array('moduleLanguageFile', 'bar'), |
|
74 | + ); |
|
75 | + } |
|
76 | + |
|
77 | + /** |
|
78 | + * @test |
|
79 | + * @dataProvider attributeProvider |
|
80 | + */ |
|
81 | + public function testAttribute($attribute, $defaultValue) |
|
82 | + { |
|
83 | + $this->assertAttributeEquals($defaultValue, $attribute, $this->fixture); |
|
84 | + } |
|
85 | + |
|
86 | + /** |
|
87 | + * Provider |
|
88 | + */ |
|
89 | + public function attributeProvider() |
|
90 | + { |
|
91 | + return array( |
|
92 | + array('dataType', $this->dataType), |
|
93 | + array('moduleKey', 'm1'), |
|
94 | + array('icon', 'EXT:vidi/ext_icon.gif') |
|
95 | + ); |
|
96 | + } |
|
97 | + |
|
98 | + /** |
|
99 | + * @test |
|
100 | + */ |
|
101 | + public function getModuleConfigurationReturnsArrayWithSomeKeys() |
|
102 | + { |
|
103 | + $moduleLoader = new ModuleLoader($this->dataType); |
|
104 | + $moduleLoader->register(); |
|
105 | + $GLOBALS['_GET']['M'] = $this->moduleCode; |
|
106 | + |
|
107 | + $moduleConfiguration = $moduleLoader->getModuleConfiguration(); |
|
108 | + $keys = array('dataType', 'additionalJavaScriptFiles', 'additionalStyleSheetFiles'); |
|
109 | + foreach ($keys as $key) { |
|
110 | + $this->assertArrayHasKey($key, $moduleConfiguration); |
|
111 | + } |
|
112 | + } |
|
113 | + |
|
114 | + /** |
|
115 | + * @test |
|
116 | + */ |
|
117 | + public function getModuleConfigurationWithParameterDataTypeReturnsDataType() |
|
118 | + { |
|
119 | + $moduleLoader = new ModuleLoader($this->dataType); |
|
120 | + $moduleLoader->register(); |
|
121 | + $GLOBALS['_GET']['M'] = $this->moduleCode; |
|
122 | + $this->assertEquals($this->dataType, $moduleLoader->getModuleConfiguration('dataType')); |
|
123 | + } |
|
124 | 124 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | use Fab\Vidi\Module\ModuleLoader; |
18 | 18 | use Fab\Vidi\Tests\Functional\AbstractFunctionalTestCase; |
19 | 19 | |
20 | -require_once dirname(dirname(__FILE__)) . '/AbstractFunctionalTestCase.php'; |
|
20 | +require_once dirname(dirname(__FILE__)).'/AbstractFunctionalTestCase.php'; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Test case for class \Fab\Vidi\Module\ModuleLoader. |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function attributeCanBeSet($attribute, $value) |
60 | 60 | { |
61 | - $setter = 'set' . ucfirst($attribute); |
|
61 | + $setter = 'set'.ucfirst($attribute); |
|
62 | 62 | $this->fixture->$setter($value); |
63 | 63 | $this->assertAttributeEquals($value, $attribute, $this->fixture); |
64 | 64 | } |
@@ -25,42 +25,42 @@ |
||
25 | 25 | */ |
26 | 26 | class RelationRendererTest extends AbstractFunctionalTestCase |
27 | 27 | { |
28 | - /** |
|
29 | - * @var RelationRenderer |
|
30 | - */ |
|
31 | - private $fixture; |
|
28 | + /** |
|
29 | + * @var RelationRenderer |
|
30 | + */ |
|
31 | + private $fixture; |
|
32 | 32 | |
33 | - /** |
|
34 | - * @var string |
|
35 | - */ |
|
36 | - private $dataType = 'fe_users'; |
|
33 | + /** |
|
34 | + * @var string |
|
35 | + */ |
|
36 | + private $dataType = 'fe_users'; |
|
37 | 37 | |
38 | - /** |
|
39 | - * @var string |
|
40 | - */ |
|
41 | - private $moduleCode = 'user_VidiFeUsersM1'; |
|
38 | + /** |
|
39 | + * @var string |
|
40 | + */ |
|
41 | + private $moduleCode = 'user_VidiFeUsersM1'; |
|
42 | 42 | |
43 | - public function setUp() |
|
44 | - { |
|
45 | - parent::setUp(); |
|
46 | - $moduleLoader = new ModuleLoader($this->dataType); |
|
47 | - $moduleLoader->register(); |
|
48 | - $GLOBALS['_GET']['M'] = $this->moduleCode; |
|
49 | - $this->fixture = new RelationRenderer(); |
|
50 | - } |
|
43 | + public function setUp() |
|
44 | + { |
|
45 | + parent::setUp(); |
|
46 | + $moduleLoader = new ModuleLoader($this->dataType); |
|
47 | + $moduleLoader->register(); |
|
48 | + $GLOBALS['_GET']['M'] = $this->moduleCode; |
|
49 | + $this->fixture = new RelationRenderer(); |
|
50 | + } |
|
51 | 51 | |
52 | - public function tearDown() |
|
53 | - { |
|
54 | - unset($this->fixture, $GLOBALS['_GET']['M']); |
|
55 | - } |
|
52 | + public function tearDown() |
|
53 | + { |
|
54 | + unset($this->fixture, $GLOBALS['_GET']['M']); |
|
55 | + } |
|
56 | 56 | |
57 | - /** |
|
58 | - * @test |
|
59 | - */ |
|
60 | - public function renderAssetWithNoCategoryReturnsEmpty() |
|
61 | - { |
|
62 | - $content = new Content($this->dataType); |
|
63 | - $this->markTestIncomplete(); # TCA must be faked |
|
64 | - #$actual = $this->fixture->setObject($content)->render(); |
|
65 | - } |
|
57 | + /** |
|
58 | + * @test |
|
59 | + */ |
|
60 | + public function renderAssetWithNoCategoryReturnsEmpty() |
|
61 | + { |
|
62 | + $content = new Content($this->dataType); |
|
63 | + $this->markTestIncomplete(); # TCA must be faked |
|
64 | + #$actual = $this->fixture->setObject($content)->render(); |
|
65 | + } |
|
66 | 66 | } |
@@ -9,45 +9,45 @@ |
||
9 | 9 | */ |
10 | 10 | class FeatureContext extends MinkContext |
11 | 11 | { |
12 | - /** |
|
13 | - * Initializes context. |
|
14 | - * Every scenario gets it's own context object. |
|
15 | - * |
|
16 | - * @param array $parameters context parameters (set them up through behat.yml) |
|
17 | - */ |
|
18 | - public function __construct(array $parameters) |
|
19 | - { |
|
20 | - // Initialize your context here |
|
21 | - } |
|
12 | + /** |
|
13 | + * Initializes context. |
|
14 | + * Every scenario gets it's own context object. |
|
15 | + * |
|
16 | + * @param array $parameters context parameters (set them up through behat.yml) |
|
17 | + */ |
|
18 | + public function __construct(array $parameters) |
|
19 | + { |
|
20 | + // Initialize your context here |
|
21 | + } |
|
22 | 22 | |
23 | - /** |
|
24 | - * @Given /^I wait "([^"]*)" seconds$/ |
|
25 | - */ |
|
26 | - public function iWaitSeconds($seconds) |
|
27 | - { |
|
28 | - sleep($seconds); |
|
29 | - } |
|
23 | + /** |
|
24 | + * @Given /^I wait "([^"]*)" seconds$/ |
|
25 | + */ |
|
26 | + public function iWaitSeconds($seconds) |
|
27 | + { |
|
28 | + sleep($seconds); |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * @Given /^I am on the main page$/ |
|
33 | - */ |
|
34 | - public function iAmOnTheMainPage() |
|
35 | - { |
|
36 | - return array( |
|
37 | - new Behat\Behat\Context\Step\Given(sprintf('I am on "%s"', 'mod.php?M=user_MediaM1')), |
|
38 | - ); |
|
39 | - } |
|
31 | + /** |
|
32 | + * @Given /^I am on the main page$/ |
|
33 | + */ |
|
34 | + public function iAmOnTheMainPage() |
|
35 | + { |
|
36 | + return array( |
|
37 | + new Behat\Behat\Context\Step\Given(sprintf('I am on "%s"', 'mod.php?M=user_MediaM1')), |
|
38 | + ); |
|
39 | + } |
|
40 | 40 | |
41 | - /** |
|
42 | - * @Given /^I am logged in as "([^"]*)" with password "([^"]*)"$/ |
|
43 | - */ |
|
44 | - public function iAmLoggedInAsWithPassword($username, $password) |
|
45 | - { |
|
46 | - $this->loginUrl = 'http://media.fab/'; |
|
47 | - return array( |
|
48 | - new Behat\Behat\Context\Step\Given(sprintf('I am on "%s"', $this->loginUrl)), |
|
49 | - new When(sprintf('I fill in "Password" with "%s"', $password)), |
|
50 | - new When('I press "Identification"'), |
|
51 | - ); |
|
52 | - } |
|
41 | + /** |
|
42 | + * @Given /^I am logged in as "([^"]*)" with password "([^"]*)"$/ |
|
43 | + */ |
|
44 | + public function iAmLoggedInAsWithPassword($username, $password) |
|
45 | + { |
|
46 | + $this->loginUrl = 'http://media.fab/'; |
|
47 | + return array( |
|
48 | + new Behat\Behat\Context\Step\Given(sprintf('I am on "%s"', $this->loginUrl)), |
|
49 | + new When(sprintf('I fill in "Password" with "%s"', $password)), |
|
50 | + new When('I press "Identification"'), |
|
51 | + ); |
|
52 | + } |
|
53 | 53 | } |
@@ -10,12 +10,12 @@ |
||
10 | 10 | */ |
11 | 11 | class ModulePreferencesTest extends UnitTestCase |
12 | 12 | { |
13 | - /** |
|
14 | - * @test |
|
15 | - */ |
|
16 | - public function instantiateMe() |
|
17 | - { |
|
18 | - $fixture = new ModulePreferences(); |
|
19 | - $this->assertInstanceOf('Fab\Vidi\Module\ModulePreferences', $fixture); |
|
20 | - } |
|
13 | + /** |
|
14 | + * @test |
|
15 | + */ |
|
16 | + public function instantiateMe() |
|
17 | + { |
|
18 | + $fixture = new ModulePreferences(); |
|
19 | + $this->assertInstanceOf('Fab\Vidi\Module\ModulePreferences', $fixture); |
|
20 | + } |
|
21 | 21 | } |
@@ -10,29 +10,29 @@ |
||
10 | 10 | */ |
11 | 11 | class DateTest extends UnitTestCase |
12 | 12 | { |
13 | - /** |
|
14 | - * @var Date |
|
15 | - */ |
|
16 | - private $subject; |
|
13 | + /** |
|
14 | + * @var Date |
|
15 | + */ |
|
16 | + private $subject; |
|
17 | 17 | |
18 | - public function setUp() |
|
19 | - { |
|
20 | - date_default_timezone_set('GMT'); |
|
21 | - $this->subject = new Date(); |
|
22 | - $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] = 'd.m.Y'; |
|
23 | - } |
|
18 | + public function setUp() |
|
19 | + { |
|
20 | + date_default_timezone_set('GMT'); |
|
21 | + $this->subject = new Date(); |
|
22 | + $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] = 'd.m.Y'; |
|
23 | + } |
|
24 | 24 | |
25 | - public function tearDown() |
|
26 | - { |
|
27 | - unset($this->subject); |
|
28 | - } |
|
25 | + public function tearDown() |
|
26 | + { |
|
27 | + unset($this->subject); |
|
28 | + } |
|
29 | 29 | |
30 | - /** |
|
31 | - * @test |
|
32 | - */ |
|
33 | - public function canFormatDate() |
|
34 | - { |
|
35 | - $foo = $this->subject->format('1351880525'); |
|
36 | - $this->assertEquals('02.11.2012', $foo); |
|
37 | - } |
|
30 | + /** |
|
31 | + * @test |
|
32 | + */ |
|
33 | + public function canFormatDate() |
|
34 | + { |
|
35 | + $foo = $this->subject->format('1351880525'); |
|
36 | + $this->assertEquals('02.11.2012', $foo); |
|
37 | + } |
|
38 | 38 | } |