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