bootDatabase(); } public function testCommandIsSuccessful(): void { $app = new Application(self::$kernel ?? throw new ThisShouldNeverHappenException("Kernel not booted yet")); $command = $app->find('brilo:refresh-database'); $commandTester = new CommandTester($command); $commandTester->execute([]); $this->assertSame(0, $commandTester->getStatusCode()); // Tady bych otestoval ze jsou tam nejake data ktere tam vzdy maji byt ... nicmene o zadnych takovych datech nevim $this->assertGreaterThan(0, $this->getEntityCount(User::class)); $this->assertGreaterThan(0, $this->getEntityCount(Company::class)); $this->assertGreaterThan(0, $this->getEntityCount(Address::class)); $this->assertGreaterThan(0, $this->getEntityCount(Post::class)); $this->assertGreaterThan(0, $this->getEntityCount(Comment::class)); } }