Exemplo n.º 1
0
Arquivo: basics.php Projeto: AF83/morm
 public function testGetData()
 {
     $author = new Authors(array('name' => 'Chuck Norris'));
     $author->save();
     $post = new Mormons('authors');
     $this->assertEqual('Chuck Norris', $post->first()->name);
     $this->assertEqual(1, $post->first()->id);
 }
Exemplo n.º 2
0
Arquivo: sti.php Projeto: AF83/morm
 public function testInstanceSTI()
 {
     $this->user = $this->createEntry('OtherUser', array('name' => 'John Doe', 'othertype' => 'corrector'));
     $user = new Mormons('otheruser');
     $this->assertIsA($user->first(), 'Corrector');
 }