-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbehat_suites.php
More file actions
77 lines (72 loc) · 3.27 KB
/
Copy pathbehat_suites.php
File metadata and controls
77 lines (72 loc) · 3.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);
use Behat\Config\Config;
use Behat\Config\Filter\TagFilter;
use Behat\Config\Profile;
use Behat\Config\Suite;
use Behat\MinkExtension\Context\MinkContext;
use Ibexa\Behat\API\Context\ContentContext;
use Ibexa\Behat\API\Context\ContentTypeContext;
use Ibexa\Behat\API\Context\LanguageContext;
use Ibexa\Behat\API\Context\TestContext;
use Ibexa\Behat\Browser\Context\AuthenticationContext;
use Ibexa\Behat\Browser\Context\BrowserContext;
use Ibexa\Behat\Browser\Context\ContentPreviewContext;
use Ibexa\Behat\Core\Context\ConfigurationContext;
use Ibexa\Behat\Core\Context\FileContext;
use Ibexa\Behat\Core\Context\TimeContext;
$varnishFeaturesPath = '%paths.base%/vendor/ibexa/http-cache/features/varnish';
$browserContexts = [
TestContext::class,
ContentTypeContext::class,
ContentContext::class,
TimeContext::class,
ConfigurationContext::class,
BrowserContext::class,
AuthenticationContext::class,
MinkContext::class,
ContentPreviewContext::class,
];
return (new Config())
->withProfile((new Profile('httpCache'))
->withSuite((new Suite('symfonycache'))
->withContexts(...$browserContexts)
->withPaths('%paths.base%/vendor/ibexa/http-cache/features/symfony'))
->withSuite((new Suite('varnish6'))
->withContexts(...$browserContexts)
->withPaths($varnishFeaturesPath)
->withFilter(new TagFilter('@varnish6&&~@translationAware')))
->withSuite((new Suite('varnish6-translation-aware'))
->withContexts(...$browserContexts)
->withPaths($varnishFeaturesPath)
->withFilter(new TagFilter('@varnish6&&~@translationNotAware')))
->withSuite((new Suite('varnish7'))
->withContexts(...$browserContexts)
->withPaths($varnishFeaturesPath)
->withFilter(new TagFilter('@varnish7&&~@translationAware')))
->withSuite((new Suite('varnish7-translation-aware'))
->withContexts(...$browserContexts)
->withPaths($varnishFeaturesPath)
->withFilter(new TagFilter('@varnish7&&~@translationNotAware')))
->withSuite((new Suite('setup'))
->withContexts(
TestContext::class,
ContentTypeContext::class,
ConfigurationContext::class,
ContentContext::class,
LanguageContext::class
)
->withPaths('%paths.base%/vendor/ibexa/http-cache/features/setup/setup.feature'))
->withSuite((new Suite('setup-token'))
->withContexts(ConfigurationContext::class)
->withPaths('%paths.base%/vendor/ibexa/http-cache/features/setup/invalidateToken.feature'))
->withSuite((new Suite('setup-symfony-cache'))
->withContexts(FileContext::class)
->withPaths('%paths.base%/vendor/ibexa/http-cache/features/setup/symfonyCache.feature'))
->withSuite((new Suite('setup-translation-aware'))
->withContexts(ConfigurationContext::class)
->withPaths('%paths.base%/vendor/ibexa/http-cache/features/setup/translationAware.feature')));