public function testSelectSimple() { // Get all users, but only for `id`, `username` and `name` fields $users = Model\User::select('id, username, name')->all(); // Should be an array, contain 4 user object $this->assertCount(4, $users); foreach ($users as $user) { // Consist $this->assertInstanceOf('Gas\\ORM', $user); $this->assertInstanceOf('Gas\\Data', $user->record); //`id`, `username` and `name` field should contain something $this->assertTrue(empty($user->id)); $this->assertInternalType('string', $user->username); $this->assertInternalType('string', $user->name); // Other than `id`, `username` and `name`, other field should be empty $this->assertEmpty($user->email); } }