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

Add FunctionalTestCase #4

Merged
merged 2 commits into from Mar 3, 2020
Merged

Conversation

@aschempp
Copy link
Contributor

aschempp commented Mar 2, 2020

This adds a helper class to ease functional test fixtures.

Example Test:*

use Contao\TestCase\FunctionalTestCase;

class DatabaseTest extends FunctionalTestCase
{
    protected function setUp(): void
    {
        parent::setUp();

        $this->loadFixture(__DIR__.'/../Fixtures/Functional/test.yml');
    }

    public function testNothing()
    {
        // nothing
    }
}

Example YAML:

tl_user:
    - name: Foo
      email: foo@bar.com

sql:
    - "UPDATE tl_user SET admin='1'"
composer.json Outdated Show resolved Hide resolved
src/FunctionalTestCase.php Outdated Show resolved Hide resolved
src/FunctionalTestCase.php Outdated Show resolved Hide resolved
src/FunctionalTestCase.php Outdated Show resolved Hide resolved
@leofeyer leofeyer assigned leofeyer and aschempp and unassigned leofeyer Mar 3, 2020
@leofeyer leofeyer added the enhancement label Mar 3, 2020
@leofeyer leofeyer merged commit cb6ec0c into contao:4.x Mar 3, 2020
@aschempp aschempp deleted the aschempp:feature/functional-test branch Mar 5, 2020
@aschempp aschempp mentioned this pull request Mar 5, 2020
leofeyer pushed a commit that referenced this pull request Mar 6, 2020
Description
-----------

Unfortunately, #4 got merged without the changes we discussed, but here they are …

Commits
-------

03516da Fix FunctionalTestCase
6022d29 Fix method name
85e014d Boot kernel when resetting database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.