Doctrine\Tests\ODM\CouchDB\Functional\EmbedNestedTest::testFind PHP Метод

testFind() публичный Метод

public testFind ( )
    public function testFind()
    {
        $embedder = $this->dm->find($this->type, 1);
        $this->assertNotNull($embedder);
        $this->assertInstanceOf($this->type, $embedder);
        $embedded = $embedder->embedded;
        $this->assertNotNull($embedded);
        $this->assertInstanceOf($this->embeddedType, $embedded);
        $nesteds = $embedded->embeds;
        $this->assertEquals(2, count($nesteds));
        $nested = $nesteds[0];
        $this->assertInstanceOf($this->nestedType, $nested);
        $this->assertEquals('nested one', $nested->nestedName);
        $nested = $nesteds[1];
        $this->assertInstanceOf($this->nestedType, $nested);
        $this->assertEquals('nested two', $nested->nestedName);
    }
EmbedNestedTest