Ejemplo n.º 1
0
 public function testIssue744()
 {
     $v = new Phalcon\Tag();
     try {
         $v->setDI(0);
         $this->assertTrue(false);
     } catch (Exception $e) {
         $this->assertTrue(true);
     }
     try {
         $v->setDI(new stdClass());
         $this->assertTrue(false);
     } catch (Exception $e) {
         $this->assertTrue(true);
     }
     try {
         $v->setDI(new Phalcon\DI());
         $this->assertTrue(true);
     } catch (Exception $e) {
         $this->assertTrue(false);
     }
     try {
         $v->setDI(new DIDescendant());
         $this->assertTrue(true);
     } catch (Exception $e) {
         $this->assertTrue(false);
     }
     try {
         $v->setDefaults(0);
         $this->assertTrue(false);
     } catch (Exception $e) {
         $this->assertTrue(true);
     }
 }