Files
yii/tests/framework/base/CApplicationComponentTest.php
alexander.makarow 1f757cbf53 improved unit tests
2011-02-18 15:25:38 +00:00

14 lines
412 B
PHP

<?php
class CApplicationComponentTest extends CTestCase {
public function testInitialization() {
$c = $this->getMockForAbstractClass('CApplicationComponent',array('init','getIsInitialized'),'',NULL);
$c->expects($this->any())
->method('getIsInitialized')
->will($this->returnValue(FALSE));
$this->assertFalse($c->getIsInitialized());
$c->init();
$this->assertTrue($c->getIsInitialized());
}
}