function testCount() { $m1 = new Model1(); $m2 = new Model2(); $this->assertEquals($m1->count(), count($m1)); $this->assertEquals($m2->count(), count($m2)); }
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); }
/** * @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])); }