コード例 #1
0
ファイル: AbstractMapperTest.php プロジェクト: respect/data
 function test_magic_getter_should_bypass_to_collection()
 {
     $collection = $this->mapper->foo->bar->baz;
     $expected = Collection::foo();
     $expected->setMapper($this->mapper);
     $this->assertEquals($expected->bar->baz, $collection);
 }
コード例 #2
0
 function test_getChildren_use_collection_next()
 {
     $coll = Collection::foo()->bar;
     $iterator = new CollectionIterator($coll);
     $this->assertTrue($iterator->hasChildren());
 }