/** * @test */ public function valueForKeyPathTest() { $this->assertEquals(1, $this->fixture->valueForKeyPath(Constants::DATA_ID_KEY)); $this->assertEquals('Representative for Hawaii\'s 1st congressional district', $this->fixture->valueForKeyPath('description')); $this->assertEquals(1, $this->fixture->valueForKeyPath('district')); $this->assertEquals('1986-10-18', $this->fixture->valueForKeyPath('enddate')); $this->assertEquals(null, $this->fixture->valueForKeyPath('leadership_title')); $this->assertEquals('Democrat', $this->fixture->valueForKeyPath('party')); $this->assertEquals('Neil', $this->fixture->valueForKeyPath('person.firstname')); $this->assertEquals('male', $this->fixture->valueForKeyPath('person.gender')); $this->assertEquals('Abercrombie', $this->fixture->valueForKeyPath('person.lastname')); }