/** * @expectedException zibo\library\database\exception\DatabaseException */ public function testSetIndexThrowsExceptionWhenIndexFieldDoesNotExist() { $table = new Table('table'); $field = new Field('field', 'type'); $index = new Index('index', array(new Field('field2', 'type'))); $table->addField($field); $table->setIndex($index); }