示例#1
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());
 }
示例#2
0
 public function testRelationshipWithInvalidRelationshipThrowsInvalidArgumentException()
 {
     $this->setExpectedException('\\InvalidArgumentException');
     Machinist::relationship('invalid');
 }