SchemaTest::testSchema PHP Method

testSchema() public method

Set up a schema with all data types
public testSchema ( )
    public function testSchema()
    {
        $obj_schema = (new \GDS\Schema('Person'))->addString('name')->addInteger('age')->addDatetime('dob')->addBoolean('single')->addFloat('weight')->addStringList('nicknames')->addProperty('surname', \GDS\Schema::PROPERTY_STRING)->addInteger('friends', FALSE)->addGeopoint('location');
        $this->assertEquals($obj_schema->getKind(), 'Person');
        $this->assertEquals($obj_schema->getProperties(), ['name' => ['type' => \GDS\Schema::PROPERTY_STRING, 'index' => TRUE], 'age' => ['type' => \GDS\Schema::PROPERTY_INTEGER, 'index' => TRUE], 'dob' => ['type' => \GDS\Schema::PROPERTY_DATETIME, 'index' => TRUE], 'single' => ['type' => \GDS\Schema::PROPERTY_BOOLEAN, 'index' => TRUE], 'weight' => ['type' => \GDS\Schema::PROPERTY_FLOAT, 'index' => TRUE], 'nicknames' => ['type' => \GDS\Schema::PROPERTY_STRING_LIST, 'index' => TRUE], 'surname' => ['type' => \GDS\Schema::PROPERTY_STRING, 'index' => TRUE], 'friends' => ['type' => \GDS\Schema::PROPERTY_INTEGER, 'index' => FALSE], 'location' => ['type' => \GDS\Schema::PROPERTY_GEOPOINT, 'index' => TRUE]]);
    }
SchemaTest