public function test_creation_sets_values_properly() { self::factory()->vote->create(array('user_id' => 5, 'item' => new MockVoteable(10), 'value' => 15)); $v = new \WeBWorK\Server\Vote(); $v->set_user_id(5); $v->set_item(new MockVoteable(10)); $v->populate(); $this->assertSame(5, $v->get_user_id()); $this->assertSame(10, $v->get_item_id()); $this->assertSame(15, $v->get_value()); }