Skip to content

Commit

Permalink
Simplified the @dataProvider in the PHPUnit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gplanchat committed Nov 12, 2020
1 parent 127cbbc commit 57b8524
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 553 deletions.
83 changes: 82 additions & 1 deletion test/StackInitTraitFixtures.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ trait StackInitTraitFixtures
{
private string $dbms;


public function useOroCommerceEnterprise()
{
yield from (new Fixture\OroCommerceEnterpriseFixture($this->dbms))
Expand Down Expand Up @@ -486,4 +485,86 @@ public function useMiddlewareCommunityWithoutBlackfire()
new Fixture\Visitor\WithDockerForMacOptimizations(),
);
}

public function useGeneric()
{
yield from $this->useOroCommerceEnterprise();
yield from $this->useOroCommerceCommunity();
yield from $this->useOroCRMEnterprise();
yield from $this->useOroCRMCommunity();
yield from $this->useOroPlatformEnterprise();
yield from $this->useOroPlatformCommunity();
yield from $this->useMarelloEnterprise();
yield from $this->useMarelloCommunity();
yield from $this->useMiddlewareEnterprise();
yield from $this->useMiddlewareCommunity();
}

public function useEnterpriseWithoutElasticStack()
{
yield from $this->useOroCommerceEnterpriseWithoutElasticStack();
yield from $this->useOroCRMEnterpriseWithoutElasticStack();
yield from $this->useOroPlatformEnterpriseWithoutElasticStack();
yield from $this->useMarelloEnterpriseWithoutElasticStack();
yield from $this->useMiddlewareEnterpriseWithoutElasticStack();
}

public function useCommunityWithoutElasticStack()
{
yield from $this->useOroCommerceCommunityWithoutElasticStack();
yield from $this->useOroCRMCommunityWithoutElasticStack();
yield from $this->useOroPlatformCommunityWithoutElasticStack();
yield from $this->useMarelloCommunityWithoutElasticStack();
yield from $this->useMiddlewareCommunityWithoutElasticStack();
}

public function useWithoutElasticStack()
{
yield from $this->useOroCommerceEnterpriseWithoutElasticStack();
yield from $this->useOroCommerceCommunityWithoutElasticStack();
yield from $this->useOroCRMEnterpriseWithoutElasticStack();
yield from $this->useOroCRMCommunityWithoutElasticStack();
yield from $this->useOroPlatformEnterpriseWithoutElasticStack();
yield from $this->useOroPlatformCommunityWithoutElasticStack();
yield from $this->useMarelloEnterpriseWithoutElasticStack();
yield from $this->useMarelloCommunityWithoutElasticStack();
yield from $this->useMiddlewareEnterpriseWithoutElasticStack();
yield from $this->useMiddlewareCommunityWithoutElasticStack();
}

public function useWithoutXdebug()
{
yield from $this->useOroCommerceEnterpriseWithoutXdebug();
yield from $this->useOroCommerceCommunityWithoutXdebug();
yield from $this->useOroCRMEnterpriseWithoutXdebug();
yield from $this->useOroCRMCommunityWithoutXdebug();
yield from $this->useOroPlatformEnterpriseWithoutXdebug();
yield from $this->useOroPlatformCommunityWithoutXdebug();
yield from $this->useMarelloEnterpriseWithoutXdebug();
yield from $this->useMarelloCommunityWithoutXdebug();
yield from $this->useMiddlewareEnterpriseWithoutXdebug();
yield from $this->useMiddlewareCommunityWithoutXdebug();
}

public function useWithoutBlackfire()
{
yield from $this->useOroCommerceEnterpriseWithoutBlackfire();
yield from $this->useOroCommerceCommunityWithoutBlackfire();
yield from $this->useOroCRMEnterpriseWithoutBlackfire();
yield from $this->useOroCRMCommunityWithoutBlackfire();
yield from $this->useOroPlatformEnterpriseWithoutBlackfire();
yield from $this->useOroPlatformCommunityWithoutBlackfire();
yield from $this->useMarelloEnterpriseWithoutBlackfire();
yield from $this->useMarelloCommunityWithoutBlackfire();
yield from $this->useMiddlewareEnterpriseWithoutBlackfire();
yield from $this->useMiddlewareCommunityWithoutBlackfire();
}

public function useAll()
{
yield from $this->useGeneric();
yield from $this->useWithoutBlackfire();
yield from $this->useWithoutElasticStack();
yield from $this->useWithoutXdebug();
}
}
Loading

0 comments on commit 57b8524

Please sign in to comment.