Ejemplo n.º 1
0
 public function testGetBlueprintsHasAll()
 {
     $bp1 = Machinist::blueprint("hello1");
     $bp2 = Machinist::blueprint("hello2");
     $bps = Machinist::instance()->getBlueprints();
     $this->assertContains($bp1, $bps);
     $this->assertContains($bp2, $bps);
 }
Ejemplo n.º 2
0
 public function testFindOrSomething()
 {
     $bp = Machinist::blueprint("some_stuff", array('name' => "awesome"));
     $values = array('some_id' => 1, 'stuff_id' => 2);
     $d = $bp->make($values);
     $r = Machinist::blueprint('some_stuff')->find($values);
     $this->assertEquals($d->getId(), $r[0]->getId());
 }