Skip to content

Commit

Permalink
added test for scope
Browse files Browse the repository at this point in the history
  • Loading branch information
matej21 committed Oct 6, 2015
1 parent f5aacdb commit 1cb5b2d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/src/SortableTestCase.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@ class SortableTestCase extends TestCase
}


public function testScope()
{
$categories = [];
for ($i = 1; $i <= 6; $i++) {
$categories[$i] = $cat = new Category('Category ' . $i);
$cat->setSortableScope(['name']);
$this->em->persist($cat);
}
$this->em->flush();
foreach ($categories as $category) {
Assert::equal(1, $category->getPosition());
}

}


public function testPersistSetPosition()
{
$categories = $this->createCategories();
Expand Down Expand Up @@ -124,6 +140,7 @@ class SortableTestCase extends TestCase
Assert::same(2, $categories[6]->getPosition());
}


public function testRemove()
{
$categories = $this->createCategories();
Expand Down

0 comments on commit 1cb5b2d

Please sign in to comment.