/** * DB\Model::copy */ public function test_copy() { $book = new CCUnit\Model_Book(); $book->name = "The Swarm"; $book->pages = array(1 => 'Vorwort', 219 => 'Ende'); $book->save(); $book_2 = $book->copy(); $book_2->name .= ' 2'; $this->assertTrue($book_2->id == null); $book_2->save(); $this->assertFalse($book->id == $book_2->id); }