init without trunk
This commit is contained in:
parent
ed24ac4994
commit
bb809e7233
14652 changed files with 177862 additions and 94817 deletions
60
vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/ContainsCommandTest.php
vendored
Normal file
60
vendor/doctrine/doctrine-cache-bundle/Tests/Functional/Command/ContainsCommandTest.php
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\Bundle\DoctrineCacheBundle\Tests\Functional\Command;
|
||||
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Doctrine\Bundle\DoctrineCacheBundle\Command\ContainsCommand;
|
||||
|
||||
/**
|
||||
* Functional test for delete command.
|
||||
*
|
||||
* @author Alan Doucette <dragonwize@gmail.com>
|
||||
*/
|
||||
class ContainsCommandTest extends CommandTestCase
|
||||
{
|
||||
/**
|
||||
* @var \Doctrine\Bundle\DoctrineCacheBundle\Command\ContainsCommand
|
||||
*/
|
||||
protected $command;
|
||||
|
||||
/**
|
||||
* @var \Symfony\Component\Console\Tester\CommandTester
|
||||
*/
|
||||
protected $tester;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->command = new ContainsCommand();
|
||||
$this->tester = $this->getTester($this->command);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if a cache does not contain an entry.
|
||||
*/
|
||||
public function testContainsFalse()
|
||||
{
|
||||
$this->tester->execute(array(
|
||||
'cache-name' => $this->cacheName,
|
||||
'cache-id' => $this->cacheId,
|
||||
));
|
||||
$this->assertEquals("FALSE\n", $this->tester->getDisplay());
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if a cache contains an entry.
|
||||
*/
|
||||
public function testContainsTrue()
|
||||
{
|
||||
$this->provider->save($this->cacheId, 'hello world');
|
||||
$this->tester->execute(array(
|
||||
'cache-name' => $this->cacheName,
|
||||
'cache-id' => $this->cacheId,
|
||||
));
|
||||
$this->assertEquals("TRUE\n", $this->tester->getDisplay());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue