Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refresh test * add command tests * use trait * add use * change backOffice to backoffice * refresh tests * refresh composer * refresh composer
- Loading branch information
1 parent
b91afea
commit a94b1dc
Showing
9 changed files
with
248 additions
and
78 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
...rchestra/Tests/Functional/BackofficeBundle/Command/OrchestraPublishContentCommandTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
namespace OpenOrchestra\FunctionalTests\BackofficeBundle\Command; | ||
|
||
use Symfony\Bundle\FrameworkBundle\Console\Application; | ||
use OpenOrchestra\BackofficeBundle\Command\OrchestraPublishContentCommand; | ||
use OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractWebTestCase; | ||
use OpenOrchestra\FunctionalTests\BackofficeBundle\Command\PublishElementCommandTrait; | ||
|
||
/** | ||
* Class OrchestraPublishContentCommandTest | ||
*/ | ||
class OrchestraPublishContentCommandTest extends AbstractWebTestCase | ||
{ | ||
use PublishElementCommandTrait; | ||
|
||
protected $application; | ||
|
||
/** | ||
* Set Up | ||
*/ | ||
public function setUp() | ||
{ | ||
$client = self::createClient(); | ||
$this->application = new Application($client->getKernel()); | ||
$this->application->setAutoExit(false); | ||
$this->application->add(new OrchestraPublishContentCommand()); | ||
} | ||
|
||
/** | ||
* Test the command | ||
* | ||
* @param string $siteId | ||
* | ||
* @dataProvider provideSiteId | ||
*/ | ||
public function testExecute($siteId) | ||
{ | ||
$this->executePublish($siteId, 'orchestra:publish:content', 'open_orchestra_model.repository.content', 'content'); | ||
} | ||
|
||
/** | ||
* Provide site id | ||
*/ | ||
public function provideSiteId() | ||
{ | ||
return array( | ||
array('2'), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...hestra/Tests/Functional/BackofficeBundle/Command/OrchestraUnpublishContentCommandTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
namespace OpenOrchestra\FunctionalTests\BackofficeBundle\Command; | ||
|
||
use OpenOrchestra\BackofficeBundle\Command\OrchestraUnpublishContentCommand; | ||
use Symfony\Bundle\FrameworkBundle\Console\Application; | ||
use OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractWebTestCase; | ||
use OpenOrchestra\FunctionalTests\BackofficeBundle\Command\PublishElementCommandTrait; | ||
|
||
/** | ||
* Class OrchestraUnpublishContentCommandTest | ||
*/ | ||
class OrchestraUnpublishContentCommandTest extends AbstractWebTestCase | ||
{ | ||
use PublishElementCommandTrait; | ||
|
||
protected $application; | ||
|
||
/** | ||
* Set Up | ||
*/ | ||
public function setUp() | ||
{ | ||
$client = self::createClient(); | ||
$this->application = new Application($client->getKernel()); | ||
$this->application->setAutoExit(false); | ||
$this->application->add(new OrchestraUnpublishContentCommand()); | ||
} | ||
|
||
/** | ||
* Test the command | ||
* | ||
* @param string $siteId | ||
* | ||
* @dataProvider provideSiteId | ||
*/ | ||
public function testExecute($siteId) | ||
{ | ||
$this->executeUnpublish($siteId, 'orchestra:unpublish:content', 'open_orchestra_model.repository.content', 'content'); | ||
} | ||
|
||
/** | ||
* Provide site id | ||
*/ | ||
public function provideSiteId() | ||
{ | ||
return array( | ||
array('2'), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.