@@ 55-62 (lines=8) @@ | ||
52 | $this->assertEquals($qb->getType(), QueryBuilder::SELECT); |
|
53 | } |
|
54 | ||
55 | public function testEmptySelectSetsType() |
|
56 | { |
|
57 | $qb = $this->_em->createQueryBuilder() |
|
58 | ->delete(CmsUser::class, 'u') |
|
59 | ->select(); |
|
60 | ||
61 | $this->assertEquals($qb->getType(), QueryBuilder::SELECT); |
|
62 | } |
|
63 | ||
64 | public function testDeleteSetsType() |
|
65 | { |
|
@@ 64-71 (lines=8) @@ | ||
61 | $this->assertEquals($qb->getType(), QueryBuilder::SELECT); |
|
62 | } |
|
63 | ||
64 | public function testDeleteSetsType() |
|
65 | { |
|
66 | $qb = $this->_em->createQueryBuilder() |
|
67 | ->from(CmsUser::class, 'u') |
|
68 | ->delete(); |
|
69 | ||
70 | $this->assertEquals($qb->getType(), QueryBuilder::DELETE); |
|
71 | } |
|
72 | ||
73 | public function testUpdateSetsType() |
|
74 | { |
|
@@ 73-80 (lines=8) @@ | ||
70 | $this->assertEquals($qb->getType(), QueryBuilder::DELETE); |
|
71 | } |
|
72 | ||
73 | public function testUpdateSetsType() |
|
74 | { |
|
75 | $qb = $this->_em->createQueryBuilder() |
|
76 | ->from(CmsUser::class, 'u') |
|
77 | ->update(); |
|
78 | ||
79 | $this->assertEquals($qb->getType(), QueryBuilder::UPDATE); |
|
80 | } |
|
81 | ||
82 | public function testSimpleSelect() |
|
83 | { |
|
@@ 802-809 (lines=8) @@ | ||
799 | $this->assertEquals(QueryBuilder::STATE_CLEAN, $qb->getState()); |
|
800 | } |
|
801 | ||
802 | public function testAlteringQueryChangesStateToDirty() |
|
803 | { |
|
804 | $qb = $this->_em->createQueryBuilder() |
|
805 | ->select('u') |
|
806 | ->from(CmsUser::class, 'u'); |
|
807 | ||
808 | $this->assertEquals(QueryBuilder::STATE_DIRTY, $qb->getState()); |
|
809 | } |
|
810 | ||
811 | public function testSelectWithFuncExpression() |
|
812 | { |