AppserverIo\Appserver\Core\Api\AppServiceTest::testPersist PHP Method

testPersist() public method

Tests if we can persist apps into our configuration
public testPersist ( ) : null
return null
    public function testPersist()
    {
        $appNode = new AppNode(__METHOD__, '/opt/appserver/targetwebapp');
        $this->appService->persist($appNode);
        $apps = $this->appService->getSystemConfiguration()->getApps();
        $foundApp = false;
        foreach ($apps as $app) {
            if ($app->getName() === __METHOD__) {
                $foundApp = true;
                break;
            }
        }
        $this->assertTrue($foundApp);
    }