Pheasant\Tests\Relationships\JoinTest::testNestedJoiningAndFiltering PHP Method

testNestedJoiningAndFiltering() public method

    public function testNestedJoiningAndFiltering()
    {
        $collection = Power::all()->join(array('Hero' => array('SecretIdentity' => array('Hero h2'))))->filter('SecretIdentity.realname = ?', "Peter Parker");
        $this->assertCount(2, $collection);
        $this->assertEquals('Super-human Strength', $collection[0]->description);
        $this->assertEquals('Spider Senses', $collection[1]->description);
    }