TYPO3 CMS
TYPO3_6-2
Main Page
Related Pages
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
+
Files
File List
+
File Members
+
All
$
(
_
a
c
d
e
f
h
i
l
o
p
r
s
t
u
x
+
Functions
_
a
c
d
e
f
i
l
o
p
r
s
u
x
+
Variables
$
(
_
a
d
e
h
i
p
r
s
t
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
TreeNodeCollectionTest.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Backend\Tests\Unit\Tree
;
3
22
class
TreeNodeCollectionTest
extends
\TYPO3\CMS\Core\Tests\UnitTestCase
{
23
27
public
function
sortNodes
() {
28
$nodeCollection = new \TYPO3\CMS\Backend\Tree\TreeNodeCollection(array(
29
array(
'serializeClassName'
=>
'TYPO3\\CMS\\Backend\\Tree\\TreeNode'
,
'id'
=> 15),
30
array(
'serializeClassName'
=>
'TYPO3\\CMS\\Backend\\Tree\\TreeNode'
,
'id'
=> 25),
31
array(
'serializeClassName'
=>
'TYPO3\\CMS\\Backend\\Tree\\TreeNode'
,
'id'
=> 5),
32
array(
'serializeClassName'
=>
'TYPO3\\CMS\\Backend\\Tree\\TreeNode'
,
'id'
=> 2),
33
array(
'serializeClassName'
=>
'TYPO3\\CMS\\Backend\\Tree\\TreeNode'
,
'id'
=> 150),
34
array(
'serializeClassName'
=>
'TYPO3\\CMS\\Backend\\Tree\\TreeNode'
,
'id'
=> 67)
35
));
36
$nodeCollection->asort();
37
$expected = array(2, 5, 15, 25, 67, 150);
38
$ids = array();
39
foreach
($nodeCollection as $node) {
40
$ids[] = $node->getId();
41
}
42
$this->assertSame($expected, $ids);
43
}
44
45
}
TYPO3\CMS\Backend\Tests\Unit\Tree\TreeNodeCollectionTest\sortNodes
sortNodes()
Definition:
TreeNodeCollectionTest.php:27
TYPO3\CMS\Backend\Tests\Unit\Tree\TreeNodeCollectionTest
Definition:
TreeNodeCollectionTest.php:22
TYPO3\CMS\Backend\Tests\Unit\Tree
TYPO3\CMS\Core\Tests\UnitTestCase
Definition:
UnitTestCase.php:26
typo3
sysext
backend
Tests
Unit
Tree
TreeNodeCollectionTest.php
Generated on Wed Aug 7 2019 09:52:19 for TYPO3 CMS by
1.8.13