Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functional test Integration #64

Open
alexander-schranz opened this issue Nov 14, 2022 · 0 comments
Open

Functional test Integration #64

alexander-schranz opened this issue Nov 14, 2022 · 0 comments
Labels
Code Quality Things improving the code quality of the packages

Comments

@alexander-schranz
Copy link
Contributor

alexander-schranz commented Nov 14, 2022

There should be atleast one Functional test for every Template engine in every Framework. As we should go with using the Framework specific tools like roadrunner for Spiral or artisan serve for Laravel a common test would look like this:

class LaravelTwigTest extends AbstractTestCase {
    public static function setUpBeforeClass(): void
    {
         static::serverRun('artisan serve');
    }
    
    public function testTwig(): void
    {
        $response = $client->request('GET', 'http://127.0.0.1:8000/twig');
        $this->assertHttpStatusCode(200);
        
        $content = $response->getContent();
        
        $this->assertStringContainsString('TwigRenderer', $content);
    }
}
@alexander-schranz alexander-schranz added Feature A new feature to be added Code Quality Things improving the code quality of the packages and removed Feature A new feature to be added labels Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Quality Things improving the code quality of the packages
Projects
None yet
Development

No branches or pull requests

1 participant