CI->load->library('Widget'); } public function testMethod() { // Check if everything is ok $widget = new Widget(array('color' => 'white')); $this->assertNotNull($widget, "widget created"); $this->assertEquals($widget->get('color'), 'white', 'attribut par défaut'); $widget->set('color', 'red'); $this->assertEquals($widget->get('color'), 'red', 'attribut après affectation'); $this->assertEquals($widget->image(), '', 'image par defaut'); $this->assertNull($widget->display(), "widget->display()"); } }