Beispiel #1
0
 public function testInitIncompatibleObject()
 {
     $base = new Query($this->entityManager->recordManager);
     $this->assertFalse($base->setObject(new stdClass(), false));
     $this->assertNull($base->getObject());
     $this->setExpectedException("Bond\\RecordManager\\Exception\\BadTaskException");
     $base->setObject(new stdClass());
 }
Beispiel #2
0
 public function testSuccess()
 {
     $task = new Query($this->entityManager->recordManager);
     $this->assertTrue($task instanceof Query);
     $this->assertTrue($task instanceof Task);
     $task->setObject(new Raw("SELECT 1"));
     $this->assertTrue($task->execute($this->db));
 }