em = static::$kernel->getContainer()->get('doctrine')->getManager(); $this->subscriptionRepo = $this->em->getRepository('SkobkinPointToolsBundle:Subscription'); } public function testGetUserSubscribersCountById(): int { $count = $this->subscriptionRepo->getUserSubscribersCountById(99999); $this->assertInternalType('int', $count, 'Not integer returned'); $this->assertGreaterThanOrEqual(2, $count, 'Lesser than 2 subscribers found'); $this->assertLessThanOrEqual(5, $count, 'More than 5 subscribers found'); return $count; } }