@@ -46,16 +46,16 @@ public function testEitherWithBeans()
46
46
)
47
47
)));
48
48
$ book = R::load ('book ' , $ id );
49
- asrt ($ book ->either ()->title ->or ('nothing ' ),'Socratic Questions ' );
49
+ asrt ($ book ->either ()->title ->_or ('nothing ' ),'Socratic Questions ' );
50
50
$ pageId = R::findOne ('page ' )->id ;
51
- asrt ($ book ->either ()->ownPageList ->index ($ pageId )->id ->or (0 ), $ pageId );
52
- asrt ($ book ->either ()->ownPageList ->index ($ pageId +1 )->ownTextList ->index (1 )->or (0 ), 0 );
53
- $ textId = $ book ->either ()->ownPageList ->first ()->ownParagraphList ->last ()->id ->or (0 );
51
+ asrt ($ book ->either ()->ownPageList ->index ($ pageId )->id ->_or (0 ), $ pageId );
52
+ asrt ($ book ->either ()->ownPageList ->index ($ pageId +1 )->ownTextList ->index (1 )->_or (0 ), 0 );
53
+ $ textId = $ book ->either ()->ownPageList ->first ()->ownParagraphList ->last ()->id ->_or (0 );
54
54
asrt ($ textId > 0 , TRUE );
55
55
$ text = R::load ('paragraph ' , $ textId );
56
- asrt ($ text ->either ()->page ->book ->title ->or ('nothing ' ), 'Socratic Questions ' );
57
- asrt ($ book ->either ()->ownPageList ->last ()->id ->or (-1 ),$ pageId );
58
- asrt ($ book ->either ()->ownPageList ->id ->or (-1 ),-1 );
59
- asrt ($ book ->either ()->ownPageList ->first ()->ownQuoteList ->first ()->or ('? ' ),'? ' );
56
+ asrt ($ text ->either ()->page ->book ->title ->_or ('nothing ' ), 'Socratic Questions ' );
57
+ asrt ($ book ->either ()->ownPageList ->last ()->id ->_or (-1 ),$ pageId );
58
+ asrt ($ book ->either ()->ownPageList ->id ->_or (-1 ),-1 );
59
+ asrt ($ book ->either ()->ownPageList ->first ()->ownQuoteList ->first ()->_or ('? ' ),'? ' );
60
60
}
61
61
}
0 commit comments