Skip to content

Commit b738908

Browse files
committed
use assertCount in tests
1 parent 0eb245a commit b738908

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tests/PHPCR/Tests/Util/QOM/QueryBuilderTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testAddOrderBy()
3333
$qb = new QueryBuilder($this->qf);
3434
$qb->addOrderBy($dynamicOperand, 'ASC');
3535
$qb->addOrderBy($dynamicOperand, 'DESC');
36-
$this->assertEquals(2, count($qb->getOrderings()));
36+
$this->assertCount(2, $qb->getOrderings());
3737
$orderings = $qb->getOrderings();
3838
}
3939

@@ -43,7 +43,7 @@ public function testAddOrderByLowercase()
4343
$qb = new QueryBuilder($this->qf);
4444
$qb->addOrderBy($dynamicOperand, 'asc');
4545
$qb->addOrderBy($dynamicOperand, 'desc');
46-
$this->assertEquals(2, count($qb->getOrderings()));
46+
$this->assertCount(2, $qb->getOrderings());
4747
$orderings = $qb->getOrderings();
4848
}
4949

@@ -63,7 +63,7 @@ public function testOrderBy()
6363
$qb = new QueryBuilder($this->qf);
6464
$qb->orderBy($dynamicOperand, 'ASC');
6565
$qb->orderBy($dynamicOperand, 'ASC');
66-
$this->assertEquals(1, count($qb->getOrderings()));
66+
$this->assertCount(1, $qb->getOrderings());
6767
}
6868

6969
public function testOrderAscending()
@@ -135,21 +135,21 @@ public function testOrWhere()
135135
public function testSelect()
136136
{
137137
$qb = new QueryBuilder($this->qf);
138-
$this->assertEquals(0, count($qb->getColumns()));
138+
$this->assertCount(0, $qb->getColumns());
139139
$qb->select('selectorName', 'propertyName', 'columnName');
140-
$this->assertEquals(1, count($qb->getColumns()));
140+
$this->assertCount(1, $qb->getColumns());
141141
$qb->select('selectorName', 'propertyName', 'columnName');
142-
$this->assertEquals(1, count($qb->getColumns()));
142+
$this->assertCount(1, $qb->getColumns());
143143
}
144144

145145
public function testAddSelect()
146146
{
147147
$qb = new QueryBuilder($this->qf);
148-
$this->assertEquals(0, count($qb->getColumns()));
148+
$this->assertCount(0, $qb->getColumns());
149149
$qb->addSelect('selectorName', 'propertyName', 'columnName');
150-
$this->assertEquals(1, count($qb->getColumns()));
150+
$this->assertCount(1, $qb->getColumns());
151151
$qb->addSelect('selectorName', 'propertyName', 'columnName');
152-
$this->assertEquals(2, count($qb->getColumns()));
152+
$this->assertCount(2, $qb->getColumns());
153153
}
154154

155155
public function testFrom()
@@ -254,7 +254,7 @@ public function testSetParameters()
254254
$key2 = "key2";
255255
$value2 = "value2";
256256
$qb->setParameters(array($key1, $value1), array($key2, $value2));
257-
$this->assertEquals("2", count($qb->getParameters()));
257+
$this->assertCount(2, $qb->getParameters());
258258
}
259259

260260
public function testExecute()

0 commit comments

Comments
 (0)