Commit 79859238 by Alexander Makarov

more tests for Dictionary

parent 411a1b84
......@@ -62,6 +62,8 @@ class DictionaryTest extends \yiiunit\TestCase
$this->dictionary->add('key3',$this->item3);
$this->assertEquals(3,$this->dictionary->getCount());
$this->assertTrue($this->dictionary->contains('key3'));
$this->dictionary[] = 'test';
}
public function testRemove()
......@@ -74,9 +76,15 @@ class DictionaryTest extends \yiiunit\TestCase
public function testClear()
{
$this->dictionary->add('key3',$this->item3);
$this->dictionary->clear();
$this->assertEquals(0,$this->dictionary->getCount());
$this->assertTrue(!$this->dictionary->contains('key1') && !$this->dictionary->contains('key2'));
$this->dictionary->add('key3',$this->item3);
$this->dictionary->clear(true);
$this->assertEquals(0,$this->dictionary->getCount());
$this->assertTrue(!$this->dictionary->contains('key1') && !$this->dictionary->contains('key2'));
}
public function testContains()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment