コード例 #1
0
ファイル: CollectionScopeTest.php プロジェクト: lox/pheasant
 public function testNonExistantProperty()
 {
     $this->setExpectedException('BadMethodCallException');
     Animal::all()->llamas();
 }
コード例 #2
0
ファイル: CollectionTest.php プロジェクト: lox/pheasant
 public function testAggregateFunctions()
 {
     $this->assertEquals(3, Animal::all()->max('id'));
     $this->assertEquals(1, Animal::all()->min('id'));
     $this->assertEquals(6, Animal::all()->sum('id'));
 }