예제 #1
0
 function renderHtmlCopy()
 {
     $kursus = new VIH_Model_KortKursus($this->name());
     $new_kursus = new VIH_Model_KortKursus();
     if ($id = $new_kursus->copy($kursus)) {
         return new k_SeeOther($this->url('../' . $id));
     }
     throw new Exception('Could not copy course');
 }
예제 #2
0
 function testGetDeltagereReturnsAnEmptyArrayWhenNobodyHasBeenAddedYet()
 {
     $kursus = new FakeKortKursus();
     $new_kursus = new VIH_Model_KortKursus();
     $this->assertTrue($new_kursus->copy($kursus) > 0);
     $this->assertTrue(is_array($new_kursus->getDeltagere()));
     $this->assertEquals(0, count($new_kursus->getDeltagere()));
 }