Skip to content

Commit

Permalink
fix whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
fiblan committed Oct 4, 2014
1 parent e4ec7d9 commit 91ec236
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions tests/TestCase/Model/Behavior/TreeBehaviorTest.php
Expand Up @@ -194,46 +194,46 @@ public function testFindTreeList() {
];
$this->assertEquals($expected, $result);
}

/**
* Tests the find('treeList') method after moveUp, moveDown
*
* @return void
*/
public function testFindTreeListAfterMove() {
$table = TableRegistry::get('MenuLinkTrees');
$table->addBehavior('Tree', ['scope' => ['menu' => 'main-menu']]);
public function testFindTreeListAfterMove() {
$table = TableRegistry::get('MenuLinkTrees');
$table->addBehavior('Tree', ['scope' => ['menu' => 'main-menu']]);

// moveUp
$table->moveUp($table->get(3), 1);
$result = $table->find('treeList')->toArray();
$expected = [
1 => 'Link 1',
3 => '_Link 3',
4 => '__Link 4',
5 => '___Link 5',
2 => '_Link 2',
6 => 'Link 6',
7 => '_Link 7',
8 => 'Link 8'
];
$this->assertSame($expected, $result);
$table->moveUp($table->get(3), 1);
$result = $table->find('treeList')->toArray();
$expected = [
1 => 'Link 1',
3 => '_Link 3',
4 => '__Link 4',
5 => '___Link 5',
2 => '_Link 2',
6 => 'Link 6',
7 => '_Link 7',
8 => 'Link 8'
];
$this->assertSame($expected, $result);

// moveDown
$table->moveDown($table->get(6), 1);
$result2 = $table->find('treeList')->toArray();
$expected2 = [
1 => 'Link 1',
3 => '_Link 3',
4 => '__Link 4',
5 => '___Link 5',
2 => '_Link 2',
8 => 'Link 8',
6 => 'Link 6',
7 => '_Link 7',
];
$this->assertSame($expected2, $result2);
}
$table->moveDown($table->get(6), 1);
$result2 = $table->find('treeList')->toArray();
$expected2 = [
1 => 'Link 1',
3 => '_Link 3',
4 => '__Link 4',
5 => '___Link 5',
2 => '_Link 2',
8 => 'Link 8',
6 => 'Link 6',
7 => '_Link 7',
];
$this->assertSame($expected2, $result2);
}

/**
* Tests the find('treeList') method with custom options
Expand Down

0 comments on commit 91ec236

Please sign in to comment.