Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 2 | Features | 0 |
1 | <?php |
||
10 | public function testNewRequestCanBeInserted() { |
||
11 | $entityManager = TestEnvironment::newDefault()->getFactory()->getEntityManager(); |
||
12 | $entityManager->persist( new Request() ); |
||
13 | $entityManager->flush(); |
||
14 | $count = $entityManager->createQueryBuilder() |
||
15 | ->select( 'COUNT(r.id)' ) |
||
16 | ->from( Request::class, 'r' ) |
||
17 | ->getQuery() |
||
18 | ->getSingleScalarResult(); |
||
19 | $this->assertEquals( 1, $count ); // Can't use assertSame because a string is returned |
||
20 | } |
||
21 | } |
||
22 |