Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

CS fixes - merges and fixes #196

  • Loading branch information...
commit a10c572aea4f9d37ffe8228360edefb4d228a860 1 parent fcc8c40
@Ocramius Ocramius authored
View
73 tests/DoctrineModuleTest/Paginator/Adapter/SelectableAdapterTest.php
@@ -43,15 +43,20 @@ public function testGetItemsAtOffsetZeroWithEmptyCriteria()
$me = $this;
- $selectable->expects($this->once())
- ->method('matching')
- ->with($this->callback(function (Criteria $criteria) use ($me) {
+ $selectable
+ ->expects($this->once())
+ ->method('matching')
+ ->with(
+ $this->callback(
+ function (Criteria $criteria) use ($me) {
$me->assertEquals(0, $criteria->getFirstResult());
$me->assertEquals(10, $criteria->getMaxResults());
return true;
- }))
- ->will($this->returnValue(new ArrayCollection(range(1, 10))));
+ }
+ )
+ )
+ ->will($this->returnValue(new ArrayCollection(range(1, 10))));
$expected = range(1, 10);
$actual = $adapter->getItems(0, 10);
@@ -72,15 +77,19 @@ public function testGetItemsAtOffsetZeroWithNonEmptyCriteria()
$selectable->expects($this->once())
->method('matching')
- ->with($this->callback(function (Criteria $innerCriteria) use ($criteria, $me) {
- // Criteria are cloned internally
- $me->assertNotEquals($innerCriteria, $criteria);
- $me->assertEquals(0, $innerCriteria->getFirstResult());
- $me->assertEquals(10, $innerCriteria->getMaxResults());
- $me->assertEquals($innerCriteria->getWhereExpression(), $criteria->getWhereExpression());
-
- return true;
- }))
+ ->with(
+ $this->callback(
+ function (Criteria $innerCriteria) use ($criteria, $me) {
+ // Criteria are cloned internally
+ $me->assertNotEquals($innerCriteria, $criteria);
+ $me->assertEquals(0, $innerCriteria->getFirstResult());
+ $me->assertEquals(10, $innerCriteria->getMaxResults());
+ $me->assertEquals($innerCriteria->getWhereExpression(), $criteria->getWhereExpression());
+
+ return true;
+ }
+ )
+ )
->will($this->returnValue(new ArrayCollection(range(1, 10))));
$expected = range(1, 10);
@@ -101,12 +110,16 @@ public function testGetItemsAtOffsetTenWithEmptyCriteria()
$selectable->expects($this->once())
->method('matching')
- ->with($this->callback(function (Criteria $criteria) use($me) {
- $me->assertEquals(10, $criteria->getFirstResult());
- $me->assertEquals(10, $criteria->getMaxResults());
+ ->with(
+ $this->callback(
+ function (Criteria $criteria) use ($me) {
+ $me->assertEquals(10, $criteria->getFirstResult());
+ $me->assertEquals(10, $criteria->getMaxResults());
- return true;
- }))
+ return true;
+ }
+ )
+ )
->will($this->returnValue(new ArrayCollection(range(11, 20))));
$expected = range(11, 20);
@@ -128,15 +141,19 @@ public function testGetItemsAtOffsetTenWithNonEmptyCriteria()
$selectable->expects($this->once())
->method('matching')
- ->with($this->callback(function (Criteria $innerCriteria) use ($criteria, $me) {
- // Criteria are cloned internally
- $me->assertNotEquals($innerCriteria, $criteria);
- $me->assertEquals(10, $innerCriteria->getFirstResult());
- $me->assertEquals(10, $innerCriteria->getMaxResults());
- $me->assertEquals($innerCriteria->getWhereExpression(), $criteria->getWhereExpression());
-
- return true;
- }))
+ ->with(
+ $this->callback(
+ function (Criteria $innerCriteria) use ($criteria, $me) {
+ // Criteria are cloned internally
+ $me->assertNotEquals($innerCriteria, $criteria);
+ $me->assertEquals(10, $innerCriteria->getFirstResult());
+ $me->assertEquals(10, $innerCriteria->getMaxResults());
+ $me->assertEquals($innerCriteria->getWhereExpression(), $criteria->getWhereExpression());
+
+ return true;
+ }
+ )
+ )
->will($this->returnValue(new ArrayCollection(range(11, 20))));
$expected = range(11, 20);
View
2  tests/DoctrineModuleTest/Service/Mock/MetadataDriverMock.php
@@ -21,4 +21,4 @@ public function getAllClassNames()
{
return array();
}
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.