[2.0] Added unit tests for CLI Configuration. Fixed hasAttrbibute() issue of undefined property.
This commit is contained in:
parent
4d88f40c81
commit
54d4476c47
23
tests/Doctrine/Tests/Common/Cli/ConfigurationTest.php
Normal file
23
tests/Doctrine/Tests/Common/Cli/ConfigurationTest.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Doctrine\Tests\Common\Cli;
|
||||||
|
|
||||||
|
use Doctrine\Common\Cli\Configuration;
|
||||||
|
|
||||||
|
require_once __DIR__ . '/../../TestInit.php';
|
||||||
|
|
||||||
|
class ConfigurationTest extends \Doctrine\Tests\DoctrineTestCase
|
||||||
|
{
|
||||||
|
public function testConfiguration()
|
||||||
|
{
|
||||||
|
$config = new Configuration();
|
||||||
|
$config->setAttribute('name', 'value');
|
||||||
|
|
||||||
|
$this->assertTrue($config->hasAttribute('name'));
|
||||||
|
$this->assertEquals('value', $config->hasAttribute('name'));
|
||||||
|
|
||||||
|
$config->setAttribute('name');
|
||||||
|
|
||||||
|
$this->assertFalse($config->hasAttribute('name'));
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user