Пример #1
0
 public function test_adding_multiple_fields_to_a_resource()
 {
     $resource = new Resource('my__0', 'myCoolResource', 'my_cool_table', 'my_cool_id');
     $field = new Field($resource, 'myCoolField', 'my_cool_field', Field::TYPE_STRING);
     $otherField = new Field($resource, 'myOtherCoolField', 'my_other_cool_field', Field::TYPE_STRING);
     $resource->addFieldsArray(array($field, $otherField));
     $this->assertEquals(2, $resource->countFields());
 }