execute() public method

Executes the query and returns the result.
public execute ( boolean $cacheResult = false ) : Neos\Flow\Persistence\QueryResultInterface
$cacheResult boolean If the Doctrine result cache should be used
return Neos\Flow\Persistence\QueryResultInterface The query result
 /**
  * @test
  */
 public function countIncludesAllResultsByDefault()
 {
     $testEntityRepository = new Fixtures\TestEntityRepository();
     $testEntityRepository->removeAll();
     $testEntity1 = new Fixtures\TestEntity();
     $testEntity1->setName('Flow');
     $testEntityRepository->add($testEntity1);
     $testEntity2 = new Fixtures\TestEntity();
     $testEntity2->setName('some');
     $testEntityRepository->add($testEntity2);
     $testEntity3 = new Fixtures\TestEntity();
     $testEntity3->setName('more');
     $testEntityRepository->add($testEntity3);
     $this->persistenceManager->persistAll();
     $query = new Query(Fixtures\TestEntity::class);
     $this->assertEquals(3, $query->execute()->count());
 }