Beispiel #1
0
 function testCount()
 {
     $m1 = new Model1();
     $m2 = new Model2();
     $this->assertEquals($m1->count(), count($m1));
     $this->assertEquals($m2->count(), count($m2));
 }
Beispiel #2
0
 function testFindWithSingleID()
 {
     $d = new Model1();
     $d->a = 5;
     $d->save();
     $c = new Model1();
     $c->find($d->getID());
     $this->assertEquals(1, $c->count());
     $this->assertEquals($c->a, $d->a);
 }
Beispiel #3
0
 /**
  * @depends testSelection
  */
 public function testCount()
 {
     $key = "counttest";
     for ($i = 0; $i < 50; ++$i) {
         Blueprint::make('Model1', ['str1' => $key]);
     }
     $this->assertEquals(50, Model1::count(['str1' => $key]));
 }