Pheasant\Tests\Relationships\RelationshipTest::testFilteringCollectionsReturnedByRelationships PHP Method

testFilteringCollectionsReturnedByRelationships() public method

    public function testFilteringCollectionsReturnedByRelationships()
    {
        $spiderman = Hero::createHelper('Spider Man', 'Peter Parker', array('Super-human Strength', 'Spider Senses'));
        $superman = Hero::createHelper('Super Man', 'Clark Kent', array('Super-human Strength', 'Invulnerability'));
        $batman = Hero::createHelper('Batman', 'Bruce Wayne', array('Richness', 'Super-human Intellect'));
        $this->assertCount(2, $spiderman->Powers);
        $this->assertCount(1, $spiderman->Powers->filter('description LIKE ?', 'Super-human%')->toArray());
    }