public function testHasOne() { $userData = array('id' => 1, 'shoe' => array('id' => 1)); $user = new TestUser($userData); $shoe = $user->hasOne('TestShoe'); $this->assertEquals(1, $shoe->id); $shoe->save(); $this->assertRequest('put', '/users/1/shoe'); }